On Sun, 1 Aug 2010, vicent roca daniel wrote:

I've a little problem though with scp.

I'm using the same code in the examples, but I'm getting random size on the destination file. When I send a file, sometimes the file it's transfered ok, and other times not (incomplete) ¿Any clues?

I just checked, and the example/scp.c is wrong in as it seems to assume that libssh2_channel_read() will always return the full amount of data, while in reality it is made to never return MORE data than requested but may very well return less (and even 0 is not an error).

I've fixed this example code now and pushed my commit.

--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to