On Tue, 13 Sep 2011, liuzl wrote:

sftp_read() {
1,window_adjust;
2,make READ packet;
3,send READ packet;
4,receive ACK packet;

I mean if we are blocking in step 3 in the first call of sftp_read() , and we received many data in step 4, so we must expand receive window in the next call. but there is a half-left user-data doesn't sent, so function will return BAD_USE in step 1 in the next call. and always return in the later call.

Quite right. I'll follow up with a fix that keeps the state better to avoid this. Although it seems to be a rather rare case in my tests...

Thanks for your accurate observations!

This is however what I meant when I said there are still remaining flaws to fix. I still believe this approach is a way forward.

--

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

Reply via email to