I'm using VC++ 2008. I've ran this example from the libssh2 website (http://www.libssh2.org/examples/scp.html) a few time and everytime it's hangs at the very last few bytes it needs to receive. I ran a debugger to see where the problem was occurring and it happened when this line:
if((fileinfo.st_size -got) < amount) { amount = fileinfo.st_size -got; }got executed before t_rc = libssh2_channel_read(t_channel, mem, amount); which is where the app hangs. When I remove the amount setter, then it works fine, however from time to time the data received is not correct. meaning the md5sum value is not the same as the origin.
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel