From 60acdb0d076de0ceb408565b231a482d66f47f61 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 3 Nov 2000 02:17:56 +0000 Subject: [PATCH] We don't really want to fool around with socket structures if we don't have to, and in this case we can get the ip address directly from the socket. This should mean that if we add more protocol support we don't have to worry about this. No doubt this is the first of many such changes... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86817 13f79535-47bb-0310-9956-ffa450edef68 --- server/connection.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/connection.c b/server/connection.c index c96d146cdf..27812d58d5 100644 --- a/server/connection.c +++ b/server/connection.c @@ -286,16 +286,13 @@ conn_rec *ap_new_connection(apr_pool_t *p, server_rec *server, conn->pool = p; conn->local_addr = *saddr; - conn->local_ip = apr_pstrdup(conn->pool, - inet_ntoa(conn->local_addr.sin_addr)); + apr_get_local_ipaddr(&conn->local_ip, inout); conn->base_server = server; conn->client = conn_io; conn->client_socket = inout; conn->remote_addr = *remaddr; - conn->remote_ip = apr_pstrdup(conn->pool, - inet_ntoa(conn->remote_addr.sin_addr)); - + apr_get_remote_ipaddr(&conn->remote_ip, inout); conn->id = id; return conn; -- 2.50.1