[Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Heiko Hund
WSAGetLastError() is just a wrapper for GetLastError(). So, there's no need to differentiate between socket related and other errors. This patch removes all special handling of socket errors in favor of simplifying the codebase somewhat. Signed-off-by: Heiko Hund --- src/openvpn/error.c |9

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Alon Bar-Lev
This is a great cleanup. Just I don't like the CONNECT_IN_PROGRESS. I think it is better to rebase first and then submit the CONNECT_IN_PROGRESS afterwards, I think it would be simpler to just compare to the two statuses. On Tue, Jul 17, 2012 at 4:57 PM, Heiko Hund wrote: > WSAGetLastError() is j

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Heiko Hund
On Tuesday 17 July 2012 17:25:25 Alon Bar-Lev wrote: > Just I don't like the CONNECT_IN_PROGRESS. > I think it is better to rebase first and then submit the > CONNECT_IN_PROGRESS afterwards, I think it would be simpler to just > compare to the two statuses. That would result in either something li

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Alon Bar-Lev
On Tue, Jul 17, 2012 at 6:09 PM, Heiko Hund wrote: > On Tuesday 17 July 2012 17:25:25 Alon Bar-Lev wrote: >> Just I don't like the CONNECT_IN_PROGRESS. >> I think it is better to rebase first and then submit the >> CONNECT_IN_PROGRESS afterwards, I think it would be simpler to just >> compare to t

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Heiko Hund
On Tuesday 17 July 2012 18:11:25 Alon Bar-Lev wrote: > #define EWOULDBLOCK WSAWOULDBLOCK EWOULDBLOCK is already defined in errno.h (also in Windows) and shouldn't be redefined in my opinion. Heiko -- Heiko Hund | Sr. Software Engineer | Tel +49-721-25516-237 | Fax -200 SOPHOS NSG | Amalienbadst

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Alon Bar-Lev
On Tue, Jul 17, 2012 at 6:15 PM, Heiko Hund wrote: > On Tuesday 17 July 2012 18:11:25 Alon Bar-Lev wrote: >> #define EWOULDBLOCK WSAWOULDBLOCK > > EWOULDBLOCK is already defined in errno.h (also in Windows) and shouldn't be > redefined in my opinion. So if this is in one place, better a simple #i

Re: [Openvpn-devel] [PATCH 0/3] better --auto-proxy support for Windows

2012-07-17 Thread Heiko Hund
On Monday 16 July 2012 16:43:52 Heiko Hund wrote: > I'll do some tests tomorrow to see how the major browsers behave regarding > proxy settings detection and will follow in their footsteps. Seems neither IE 9, Firefox 14 nor Chrome 20 takes care about the WinHTTP default proxy settings added with

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Gert Doering
Hi, On Tue, Jul 17, 2012 at 05:09:34PM +0200, Heiko Hund wrote: > if (status == EINPROGRESS > #ifdef WIN32 > || status == WSAEWOULDBLOCK > #endif > ) Please let's not do that. > or slightly less disturbing > > #ifndef WSAEWOULDBLOCK > #define WSAEWOULDBLOCK 10035L > #endif So

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread David Sommerseth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/07/12 17:46, Gert Doering wrote: > Hi, > > On Tue, Jul 17, 2012 at 05:09:34PM +0200, Heiko Hund wrote: >> if (status == EINPROGRESS #ifdef WIN32 || status == >> WSAEWOULDBLOCK #endif ) > > Please let's not do that. > >> or slightly less distur

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Gert Doering
Hi, On Tue, Jul 17, 2012 at 03:57:52PM +0200, Heiko Hund wrote: > WSAGetLastError() is just a wrapper for GetLastError(). So, there's > no need to differentiate between socket related and other errors. ACK. Earlier versions of Windows handled winsock stuff differently, but Heiko checked WinXP fo

Re: [Openvpn-devel] [PATCH] don't treat socket related errors special anymore

2012-07-17 Thread Gert Doering
Hi, On Tue, Jul 17, 2012 at 05:46:28PM +0200, Gert Doering wrote: > On Tue, Jul 17, 2012 at 05:09:34PM +0200, Heiko Hund wrote: > > if (status == EINPROGRESS > > #ifdef WIN32 > > || status == WSAEWOULDBLOCK > > #endif > > ) > > Please let's not do that. Uh. Correcting myself. In *t

[Openvpn-devel] [PATCHv2 1/2] make non-blocking connect work on Windows

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

[Openvpn-devel] [PATCHv2 2/2] don't treat socket related errors special anymore

2012-07-17 Thread Heiko Hund
WSAGetLastError() is just a wrapper for GetLastError(). So, there's no need to differentiate between socket related and other errors. This patch removes all special handling of socket errors in favor of simplifying the codebase somewhat. Signed-off-by: Heiko Hund --- src/openvpn/error.c |9

Re: [Openvpn-devel] [PATCHv2 1/2] make non-blocking connect work on Windows

2012-07-17 Thread Gert Doering
Hi, On Tue, Jul 17, 2012 at 06:19:53PM +0200, Heiko Hund wrote: > Instead of EINPROGRESS WinSock2 returns WSAEWOULDBLOCK if a non-blocking > connect(2) cannot be completed immediately. Feature-ACK (thanks for fixing :) ), and given the preceding discussion, code-ACK as well. gert -- USENET is

Re: [Openvpn-devel] [PATCHv2 2/2] don't treat socket related errors special anymore

2012-07-17 Thread Gert Doering
Hi, On Tue, Jul 17, 2012 at 06:25:16PM +0200, Heiko Hund wrote: > WSAGetLastError() is just a wrapper for GetLastError(). So, there's > no need to differentiate between socket related and other errors. ACK on current version. gert -- USENET is *not* the non-clickable part of WWW!