[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible issue with bsd_poll() on Windows
[Thread Prev] | [Thread Next]
- Subject: Re: possible issue with bsd_poll() on Windows
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 23 Nov 2018 20:54:19 +0100
- To: libssh@xxxxxxxxxx
- Cc: John Dunn <John.Dunn@xxxxxxx>
On Wednesday, September 19, 2018 7:27:14 PM CET John Dunn wrote: > On Wednesday, September 19, 2018 4:42 AM Andreas Schneider wrote: > > Does the attach patch give you a useful error? > > Unfortunately no. At least on my machine ( Win 10 x64 ) I can't get > strerror() to output anything but "Unknown error", even if I pass an error > code like ECONNREFUSED directly in. I'd also have concerns about using > strerror since at least on Windows it's not thread safe. I can use > FormatMessage to get a valid error message so it probably makes sense to > #ifdef. One other note - I don't thing prepending "Failed to poll context:" > is appropriate because at least the errors I'm trying to bubble up aren't > poll errors - they are connection errors. > > I've attached a patch which includes my changes to poll.c to set set errno > and session.c to translate errno to and ssh_err. Can you take a look at: https://git.libssh.org/users/asn/libssh.git/log/?h=master-poll
RE: possible issue with bsd_poll() on Windows | John Dunn <John.Dunn@xxxxxxx> |