Subject: Re: libssh2 master 30e2881 sftp_read: use a state variable to avoid bad writes

Re: libssh2 master 30e2881 sftp_read: use a state variable to avoid bad writes

From: liuzl <xieepp_at_gmail.com>
Date: Tue, 20 Sep 2011 10:02:48 +0800

>
> Ah right. I can see how seek could cause this (close should not).
>
> After closed a file handle, i opened another file handle for transferring,
but the read_state didn't change, then it happend.

> Did you actually see it happen and did the seek and everything else work
>> out fine afterwards?
>
> Yes, it works fine after changing.

> What do you say about clearing the state more genericly instead like this:
> + sftp->read_state = libssh2_NB_state_idle;
>

 Better!

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-09-20