[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: John Dunn <John.Dunn@xxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 19 Sep 2018 17:27:14 +0000
- To: "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
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. John
Attachment:
win32_err_codes.patch
Description: win32_err_codes.patch
RE: possible issue with bsd_poll() on Windows | John Dunn <John.Dunn@xxxxxxx> |
Re: possible issue with bsd_poll() on Windows | Andreas Schneider <asn@xxxxxxxxxxxxxx> |