]> granicus.if.org Git - apache/commitdiff
Another removal of using raw sockaddr where we should be using APR.
authorDavid Reid <dreid@apache.org>
Fri, 3 Nov 2000 14:48:40 +0000 (14:48 +0000)
committerDavid Reid <dreid@apache.org>
Fri, 3 Nov 2000 14:48:40 +0000 (14:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86822 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_core.c

index 20a11e35d2a4a5c6a2a3cef75bbdaaeadf73c1b9..26c73af5a7e03f36d0dd32f8525ec6d475d49483 100644 (file)
@@ -658,10 +658,8 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
        && conn->remote_host == NULL
        && (type == REMOTE_DOUBLE_REV
            || hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
-       iaddr = &(conn->remote_addr.sin_addr);
-       hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET);
-       if (hptr != NULL) {
-           conn->remote_host = apr_pstrdup(conn->pool, (void *)hptr->h_name);
+       if (apr_get_remote_hostname(&conn->remote_host, conn->client_socket)
+            == APR_SUCCESS){
            ap_str_tolower(conn->remote_host);
           
            if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {