Subject: Re: [libssh2] An SCP API problem

Re: [libssh2] An SCP API problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 1 Feb 2007 23:23:29 +0100 (CET)

On Thu, 1 Feb 2007, Chris Nystrom wrote:

> while (count < filesize) {
> n = libssh2_channel_read(channel, buf, BUFSIZ);
> count += n;
> if (write(file, buf, n) != n) {
> fprintf(stderr,
> "scp_read_file(): write error on file %s\n",
> local_path);
> }
> }

Thanks!

My version doesn't do the counting of the bytes received but just calls
libssh2_channel_read() assuming it would finally return 0 when the file
transfer is completed.

Reading up now on the docs in the wiki again, there's nothing that suggests I
can do it that way, so I'll adjust.

Thanks again.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-02-01