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

RE: possible issue with bsd_poll() on Windows


On Friday, July 6, 2018 12:22 AM Andreas Schneider wrote:

> So I think this is what you need to do, setting the right errno (ECONNREFUSED) for WSAECONNREFUSED and return -1.

I don't think it's that simple. Given the code at the end of the bsd_poll loop that increments rc if any bits beyond POLLHUP are set I think I need to make sure that only POLLHUP is set in .revents.

If I do end up returning -1 from bsd_poll things do error out correctly but I don't see any evidence that errno is ever looked at to generate an error message. As far as I can tell SSH_ERROR is just bubbled up and directly returned from ssh_connect and then my call to ssh_get_error returns an empty string. Is there a call I need to make to stuff something into the error_struct contained within the ssh_session?

References:
possible issue with bsd_poll() on WindowsJohn Dunn <John.Dunn@xxxxxxx>
Re: possible issue with bsd_poll() on WindowsAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org