]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* server/mpm_common.c (ap_mpm_pod_open, dummy_connection): Use
authorJoe Orton <jorton@apache.org>
Thu, 24 Feb 2005 17:51:49 +0000 (17:51 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 24 Feb 2005 17:51:49 +0000 (17:51 +0000)
ap_listeners->bind_addr for the dummy connection rather than doing a
name lookup on the first listener's hostname and using one of the
addresses returned.

* server/mpm_common.c (dummy_connection): Log the address if the
connect() fails.

Reviewed by: jorton, trawick, stoddard

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@155213 13f79535-47bb-0310-9956-ffa450edef68

STATUS
server/mpm_common.c

diff --git a/STATUS b/STATUS
index 6a1243db7a38b4eda8983fe582301c9b7bc9c3aa..c4aec347da6375602838ee040ff56569af74ab0c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -100,14 +100,6 @@ PATCHES TO BACKPORT FROM TRUNK:
        Patch for 2.0: http://www.apache.org/~pquerna/c-i-f-leak.patch
        +1: pquerna, trawick
 
-    *) dummy_connection tweak: directly use the address of the first
-       listener rather than extracting through getnameinfo(), and log
-       the address for better diagnostics in error cases.
-       http://svn.apache.org/viewcvs.cgi?rev=102869&view=rev
-       http://svn.apache.org/viewcvs.cgi?rev=105264&view=rev
-       rediffed for 2.0 as: http://www.apache.org/~jorton/ap_dummy.diff
-       +1: jorton, trawick, stoddard
-
     *) mod_ssl: Set r->user from SSLUsername earlier so that it's
        actually useful.
        http://svn.apache.org/viewcvs.cgi?rev=153280&view=rev
index b66c00847b4453b6fd2748a7bbe1e4691b42ff45..dc9e2a5845e43d9ec3a129213da17427493a0f46 100644 (file)
@@ -368,9 +368,6 @@ AP_DECLARE(apr_status_t) ap_mpm_pod_open(apr_pool_t *p, ap_pod_t **pod)
     apr_file_pipe_timeout_set((*pod)->pod_in, 0);
     (*pod)->p = p;
 
-    apr_sockaddr_info_get(&(*pod)->sa, ap_listeners->bind_addr->hostname,
-                          APR_UNSPEC, ap_listeners->bind_addr->port, 0, p);
-
     /* close these before exec. */
     apr_file_unset_inherit((*pod)->pod_in);
     apr_file_unset_inherit((*pod)->pod_out);
@@ -446,7 +443,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
         return rv;
     }
 
-    rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, p);
+    rv = apr_socket_create(&sock, ap_listeners->bind_addr->family, SOCK_STREAM, p);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
                      "get socket to connect to listener");
@@ -467,7 +464,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
         return rv;
     }
 
-    rv = apr_connect(sock, pod->sa);
+    rv = apr_connect(sock, ap_listeners->bind_addr);
     if (rv != APR_SUCCESS) {
         int log_level = APLOG_WARNING;
 
@@ -480,7 +477,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
         }
 
         ap_log_error(APLOG_MARK, log_level, rv, ap_server_conf,
-                     "connect to listener");
+                     "connect to listener on %pI", ap_listeners->bind_addr);
     }
 
     apr_socket_close(sock);