www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: SCP Transfer example Hangs

SCP Transfer example Hangs

From: Armen Babakhanian <armen_shlang_at_yahoo.com>
Date: Mon, 19 Mar 2012 11:28:09 -0700 (PDT)

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
Received on 2012-03-19

the libssh2 team