From: Fabian Keil Date: Sun, 27 Mar 2011 13:57:08 +0000 (+0000) Subject: In rfc2553_connect_to(), simplify the OS/2 code path and pray that it still works X-Git-Tag: v_3_0_18~285 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=c905b1a6dad0ce7125b6e82179445e448eb114e2 In rfc2553_connect_to(), simplify the OS/2 code path and pray that it still works --- diff --git a/jbsockets.c b/jbsockets.c index 5906f3ff..5d428f60 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.88 2011/03/27 13:56:27 fabiankeil Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.89 2011/03/27 13:56:48 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -282,10 +282,12 @@ static jb_socket rfc2553_connect_to(const char *host, int portnum, struct client connect_failed = 0; while (connect(fd, rp->ai_addr, rp->ai_addrlen) == JB_INVALID_SOCKET) { +#ifdef __OS2__ + errno = sock_errno(); +#endif /* __OS2__ */ + #ifdef _WIN32 if (errno == WSAEINPROGRESS) -#elif __OS2__ - if (sock_errno() == EINPROGRESS) #else /* ifndef _WIN32 */ if (errno == EINPROGRESS) #endif /* ndef _WIN32 || __OS2__ */ @@ -293,11 +295,7 @@ static jb_socket rfc2553_connect_to(const char *host, int portnum, struct client break; } -#ifdef __OS2__ - if (sock_errno() != EINTR) -#else if (errno != EINTR) -#endif /* __OS2__ */ { close_socket(fd); connect_failed = 1;