httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r535354 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Fri, 04 May 2007 19:12:39 GMT
Author: jim
Date: Fri May  4 12:12:38 2007
New Revision: 535354

URL: http://svn.apache.org/viewvc?view=rev&rev=535354
Log:
Abstract out (kinda) MSG_PEEK. This way when we
actually update APR and apr_socket_recvfrom()
to know about APR_MSG_OOB, APR_MSG_PEEK, etc...
this code won't need to be adjusted. Also,
make nicer for 2.2 backport.


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=535354&r1=535353&r2=535354
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri May  4 12:12:38 2007
@@ -2089,7 +2089,11 @@
 
 #define USE_ALTERNATE_IS_CONNECTED 1
 
-#if USE_ALTERNATE_IS_CONNECTED
+#if !defined(APR_MSG_PEEK) && defined(MSG_PEEK)
+#define APR_MSG_PEEK MSG_PEEK
+#endif
+
+#if USE_ALTERNATE_IS_CONNECTED && defined(APR_MSG_PEEK)
 static int is_socket_connected(apr_socket_t *socket)
 {
     apr_pollfd_t pfds[1];
@@ -2114,7 +2118,7 @@
          * If there is no data available the socket
          * is closed.
          */
-        status = apr_socket_recvfrom(&unused, socket, MSG_PEEK,
+        status = apr_socket_recvfrom(&unused, socket, APR_MSG_PEEK,
                                      &buf[0], &len);
         if (status == APR_SUCCESS && len)
             return 1;



Mime
View raw message