httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r473276 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Fri, 10 Nov 2006 09:12:58 GMT
Author: mturk
Date: Fri Nov 10 01:12:57 2006
New Revision: 473276

URL: http://svn.apache.org/viewvc?view=rev&rev=473276
Log:
Remove alternate is_socket_connected detection.

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=473276&r1=473275&r2=473276
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Nov 10 01:12:57 2006
@@ -2077,64 +2077,6 @@
     return OK;
 }
 
-#if defined(WIN32) || defined(LINUX) || defined(SOLARIS2)
-/* Tested platforms on which the alternative is_connected
- * method works.
- */
-#ifndef _MSC_VER
-#include <sys/ioctl.h>
-#endif
-#define USE_ALTERNATE_IS_CONNECTED 1
-#else
-#define USE_ALTERNATE_IS_CONNECTED 0
-#endif
-
-#if USE_ALTERNATE_IS_CONNECTED
-static int is_socket_connected(apr_socket_t *socket)
-
-{
-    fd_set fd;
-    struct timeval tv;
-    int rc;
-    apr_os_sock_t sock;
-    
-    if (apr_os_sock_get(&sock, socket) != APR_SUCCESS)
-        return 0;
-     
-    FD_ZERO(&fd);
-    FD_SET(sock, &fd);
-
-    /* Wait one microsecond */
-    tv.tv_sec  = 0;
-    tv.tv_usec = 1;
-    
-    do {
-        rc = select((int)sock + 1, &fd, NULL, NULL, &tv);
-#ifdef _MSC_VER
-        errno = WSAGetLastError() - WSABASEERR;
-#endif
-    } while (rc == -1 && errno == EINTR);
-
-    if (rc == 0) {
-        /* If we get a timeout, then we are still connected */
-        return 1;
-    }
-    else if (rc == 1) {
-#ifdef _MSC_VER
-        u_long nr;
-        if (ioctlsocket(sock, FIONREAD, &nr) == 0) {
-            return nr == 0 ? 0 : 1;
-        }
-#else
-        int nr;
-        if (ioctl(sock, FIONREAD, (void*)&nr) == 0) {
-            return nr == 0 ? 0 : 1;
-        }
-#endif
-    }
-    return 0;
-}
-#else
 static int is_socket_connected(apr_socket_t *sock)
 
 {
@@ -2158,7 +2100,6 @@
         return 1;
     }
 }
-#endif /* USE_ALTERNATE_IS_CONNECTED */
 
 PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
                                             proxy_conn_rec *conn,



Mime
View raw message