diff options
author | Jim Jagielski <jim@apache.org> | 2007-05-04 21:12:38 +0200 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2007-05-04 21:12:38 +0200 |
commit | 1c8f89ea65904faa74cda76115ac1923ecd96685 (patch) | |
tree | 96bec93fccd2e7a2245d339fe56ca5968cdc8974 /modules | |
parent | As discussed on docs@httpd, remove the FAQ and replace it with the contents (diff) | |
download | apache2-1c8f89ea65904faa74cda76115ac1923ecd96685.tar.xz apache2-1c8f89ea65904faa74cda76115ac1923ecd96685.zip |
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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@535354 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/proxy/proxy_util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index fa29e8b15b..6fe94ea770 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2089,7 +2089,11 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, #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 @@ static int is_socket_connected(apr_socket_t *socket) * 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; |