> As I mailed before there seem to be two issues: > > 1) Alexander's read with large buffer fails issue. > The reason for this is that in sftp.c line 1025 > libssh2_htonu32(s, buffer_maxlen); > needs to be changed to > libssh2_htonu32(s, bytes_requested); > The reason is that you have to tell the server the maximal buffer size > which is always < LIBSSH2_SFTP_PACKET_MAXLEN - 10. So if you use a buffer > > 39990 it will fail. > 2) My (and possibly Aleksey's) issue. > The server doesn't honor the maximal length set with SSH_FXP_READ, > instead the server sends (in my case) 13 bytes more. I think this is a > server issue (Globalscape) and can be fixed on the client if you add after > line 1002 in sftp.c > if (bytes_requested > buffer_maxlen -13) { > bytes_requested = buffer_maxlen -13; > } >
FYI: this is known issue with that server. http://forums.globalscape.com/tm.aspx?m=15249 Eric ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel