From: Joe Orton Date: Thu, 24 Feb 2005 17:51:49 +0000 (+0000) Subject: * server/mpm_common.c (ap_mpm_pod_open, dummy_connection): Use X-Git-Tag: 2.0.54~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1f74312300a9f783528204a5a51f70bb328ad82;p=thirdparty%2Fapache%2Fhttpd.git * server/mpm_common.c (ap_mpm_pod_open, dummy_connection): Use 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 --- diff --git a/STATUS b/STATUS index 6a1243db7a3..c4aec347da6 100644 --- 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 diff --git a/server/mpm_common.c b/server/mpm_common.c index b66c00847b4..dc9e2a5845e 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -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);