cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: a question regarding SFTP using curl

From: Zhonggui Li <zhongguili_at_gmail.com>
Date: Tue, 7 Apr 2009 13:54:59 +0200

Thanks Daniel and Michael..

Michael offered a very good suggestion. I followed this and came to realize
that the problem is somehow related to multi-threading. in our code if I
replace
    pthread_create(&lv_thread, NULL, &sendfile, (void*) lp_fil);
with
    kesftp_sendfile(lp_fil)

In sendfile(), the actually uploading using curl is implemented.

then it works.

But the transmission is quite slow so it's not acceptable for the server
program. And it would be too much work to upgrade the libaries within the
timeframe we have.

Do you have any suggestions?

Thanks!

2009/4/7 Michael Wood <esiotrot_at_gmail.com>

> On Mon, Apr 6, 2009 at 2:53 PM, Zhonggui Li <zhongguili_at_gmail.com> wrote:
> > Hi,
> >
> > I am using Curl to upload file with SFTP under: SunOS 5.9. Curl version
> is
> > as follows:
> >
> > $ curl --version
> > curl 7.17.1 (sparc-sun-solaris2.9) libcurl/7.17.1 OpenSSL/0.9.8
> zlib/1.2.3
> > libssh2/0.18
> > Protocols: tftp ftp telnet dict ldap http file https ftps scp sftp
> > Features: IPv6 Largefile NTLM SSL libz
> >
> > $ curl-config --libs
> > -L/develop/lib -lcurl -L/develop/lib -L/develop/lib -L/develop/lib -lssh2
> > -lssl -lcrypto -lldap -lsocket -lnsl -lz
> >
> > When I tried with Command line, I managed to upload files to the server.
> So
> > the key files are working.
>
> If it worked for you with curl from the command line, then maybe you can
> try:
>
> $ curl [other options] --libcurl test.c
>
> It will generate a C program to do the same thing.
>
> --
> Michael Wood <esiotrot_at_gmail.com>
>
Received on 2009-04-07