[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible issue with bsd_poll() on Windows


On Thursday, 6 December 2018 23:00:51 CET John Dunn wrote:
> On Thursday, November 29, 2018 12:37 AM Andreas Schneider wrote:
> > I've pushed an update to the branch. Please check!
> 
> That doesn't work.
> 
> Fds[i].events ends up getting set to POLLRDBAND and since that ANDs with
> POLLHUP rc gets incremented to 1. From the comments it looks like
> ssh_poll_ctx_dopoll is looking for rc ==0 for disconnections which doesn't
> happen in this case.
> 
> Let me know if you want any other information.

I think I got it now. POLLHUP/POLLERR did not increment the return code but it 
needs to in bsd_poll(). Also errors are normally read and set in 
ssh_socket_pollcallback() but they got overwritten by ssh_socket_close().

Please check

https://git.libssh.org/users/asn/libssh.git/log/?h=master-poll


Thanks,


	Andreas

-- 
Andreas Schneider                 asn@xxxxxxxxxxxxxx
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D



Follow-Ups:
RE: possible issue with bsd_poll() on WindowsJohn Dunn <John.Dunn@xxxxxxx>
References:
RE: possible issue with bsd_poll() on WindowsJohn Dunn <John.Dunn@xxxxxxx>
Archive administrator: postmaster@lists.cynapses.org