Re: [Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-16 Thread Heiko Hund
On Monday 16 July 2012 13:02:11 Alon Bar-Lev wrote: >On Mon, Jul 16, 2012 at 12:42 PM, Heiko Hund wrote: >> I wonder if GetLastError() works reliably with WinSock2 operations as >> msdn.microsoft.com/en-us/library/windows/desktop/ms737828%28v=vs.85%29.aspx >> and >> msdn.microsoft.com/en-us/librar

Re: [Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-16 Thread Alon Bar-Lev
On Mon, Jul 16, 2012 at 12:42 PM, Heiko Hund wrote: > On Monday 16 July 2012 12:12:24 Alon Bar-Lev wrote: >> On Mon, Jul 16, 2012 at 11:39 AM, Heiko Hund wrote: >> > On Friday 13 July 2012 20:00:49 Alon Bar-Lev wrote: >> >> In my projects I always compare to the two values EWOULDBLOCK and >> >> E

Re: [Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-16 Thread Heiko Hund
On Monday 16 July 2012 12:12:24 Alon Bar-Lev wrote: > On Mon, Jul 16, 2012 at 11:39 AM, Heiko Hund wrote: > > On Friday 13 July 2012 20:00:49 Alon Bar-Lev wrote: > >> In my projects I always compare to the two values EWOULDBLOCK and > >> EINPROGRESS and it works without much conditionals. > >> >

Re: [Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-16 Thread Alon Bar-Lev
On Mon, Jul 16, 2012 at 11:39 AM, Heiko Hund wrote: > Hi Alon > > On Friday 13 July 2012 20:00:49 Alon Bar-Lev wrote: >> In my projects I always compare to the two values EWOULDBLOCK and >> EINPROGRESS and it works without much conditionals. >> >> So simply do: >> --- >> if (status == EINPROGRES

Re: [Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-16 Thread Heiko Hund
Hi Alon On Friday 13 July 2012 20:00:49 Alon Bar-Lev wrote: > In my projects I always compare to the two values EWOULDBLOCK and > EINPROGRESS and it works without much conditionals. > > So simply do: > --- > if (status == EINPROGRESS || status == EWOULDBLOCK) While this surly compiles with min

Re: [Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-13 Thread Alon Bar-Lev
Hello, In my projects I always compare to the two values EWOULDBLOCK and EINPROGRESS and it works without much conditionals. So simply do: --- if (status == EINPROGRESS || status == EWOULDBLOCK) --- Alon. On Fri, Jul 13, 2012 at 12:55 PM, Heiko Hund wrote: > > Instead of EINPROGRESS WinSock2

[Openvpn-devel] [PATCH] make non-blocking connect work on Windows

2012-07-13 Thread Heiko Hund
Instead of EINPROGRESS WinSock2 returns WSAEWOULDBLOCK if a non-blocking connect(2) cannot be completed immediately. Signed-off-by: Heiko Hund --- configure.ac |2 ++ src/openvpn/socket.c |2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configur