]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Align the format variable for the raw IP between the error_log and the
authorGraham Leggett <minfrin@apache.org>
Tue, 22 Nov 2011 16:16:51 +0000 (16:16 +0000)
committerGraham Leggett <minfrin@apache.org>
Tue, 22 Nov 2011 16:16:51 +0000 (16:16 +0000)
access_log.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205061 13f79535-47bb-0310-9956-ffa450edef68

server/log.c

index 641d256af60e9727556ec1f5cede31ff11855ba9..8e19fc1b0b7cfd2d83261eebfc3de3fd66a0aae4 100644 (file)
@@ -561,7 +561,7 @@ static int cpystrn(char *buf, const char *arg, int buflen)
 static int log_remote_address(const ap_errorlog_info *info, const char *arg,
                               char *buf, int buflen)
 {
-    if (info->r)
+    if (info->r && !(arg && *arg == 'c'))
         return apr_snprintf(buf, buflen, "%s:%d", info->r->remote_ip,
                             info->r->remote_addr->port);
     else if (info->c)
@@ -581,16 +581,6 @@ static int log_local_address(const ap_errorlog_info *info, const char *arg,
         return 0;
 }
 
-static int log_conn_remote_address(const ap_errorlog_info *info, const char *arg,
-                              char *buf, int buflen)
-{
-    if (info->c)
-        return apr_snprintf(buf, buflen, "%s:%d", info->c->remote_ip,
-                            info->c->remote_addr->port);
-    else
-        return 0;
-}
-
 static int log_pid(const ap_errorlog_info *info, const char *arg,
                    char *buf, int buflen)
 {
@@ -910,7 +900,6 @@ AP_DECLARE(void) ap_register_log_hooks(apr_pool_t *p)
     ap_register_errorlog_handler(p, "T", log_tid, 0);
     ap_register_errorlog_handler(p, "v", log_virtual_host, 0);
     ap_register_errorlog_handler(p, "V", log_server_name, 0);
-    ap_register_errorlog_handler(p, "d", log_conn_remote_address, 0);
 }
 
 /*