> There appears to be a problem with libssh2_sftp_write() on Windows when
> transferring more than 32k of data.  In the latest HEAD it causes a
> hang whereas in some older revisions it (bizzarely) causes the next
> sftp_open operation to fail.  Using 'git bisect', I've tracked it down
> to the following commit:
> 
> ad13de92d41ab75d1c2db6edea545be32da0438a is the first bad commit commit
> ad13de92d41ab75d1c2db6edea545be32da0438a
> Author: Daniel Stenberg <[email protected]>
> Date:   Wed May 20 14:34:30 2009 +0200
> 
>     Fix _libssh2_channel_write(): fixed the write loop to also read
> from the
>     transport layer better, to avoid draining the window size when
> sending large
> 
>     packets. I also fixed the return code for it to return the number
> of bytes
>     handled in this single invoke (and not the cumulative amount).
> 
> I'm afraid I have no idea why it is failing, just that it is.  I've
> attached a test program that demonstrates the problem.  So far, I've
> not managed to reproduce the problem on Linux.  My test setup is
> libssh2 on Windows Vista communicating with an Ubuntu Linux box over a
> gigabit Ethernet network.
> 
> Could this be related to all the other 'write' related problems on the
> mailing list recently?
> 
> Alex

If I am reading your code correctly, you are starting out with a 6K buffer
and increasing from there. If you use a 1024 or less buffer and the problem
goes away, then yes this would be the same issue as others have reported.

Neil

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

Reply via email to