Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-07-22 Thread Gert Doering
Hi, On Fri, Jul 22, 2022 at 04:34:40PM -0400, Selva Nair wrote: > This one is tricky -- though the patch appeared to be a no-op for > non-Windows, in error.c:x_check_status(), it did move down the line > my_errno = openvpn_errno() and thus potentially lose the original error. At > that time it lo

Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-07-22 Thread Selva Nair
On Fri, Jul 22, 2022 at 12:17 PM Gert Doering wrote: > Hi, > > On Tue, May 03, 2022 at 03:28:40AM +0300, Lev Stipakov wrote: > > From: Lev Stipakov > > > > We use M_ERRNO flag in logging to display error code > > and error message. This has been broken on Windows, > > where we use error code fro

Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-07-22 Thread Gert Doering
Hi, On Tue, May 03, 2022 at 03:28:40AM +0300, Lev Stipakov wrote: > From: Lev Stipakov > > We use M_ERRNO flag in logging to display error code > and error message. This has been broken on Windows, > where we use error code from GetLastError() and > error description from strerror(). strerror()

Re: [Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-05-03 Thread Selva Nair
Hi, Thanks for the changes. Looks good. On Tue, May 3, 2022 at 9:12 AM Lev Stipakov wrote: > From: Lev Stipakov > > We use M_ERRNO flag in logging to display error code > and error message. This has been broken on Windows, > where we use error code from GetLastError() and > error description f

[Openvpn-devel] [PATCH v2] Fix M_ERRNO behavior on Windows

2022-05-03 Thread Lev Stipakov
From: Lev Stipakov We use M_ERRNO flag in logging to display error code and error message. This has been broken on Windows, where we use error code from GetLastError() and error description from strerror(). strerror() expects C runtime error code, which is quite different from last error code fro