From d98a314d98d707da4d0736eb2928679210707b54 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Tue, 22 Nov 2011 16:16:51 +0000 Subject: [PATCH] Align the format variable for the raw IP between the error_log and the access_log. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1205061 13f79535-47bb-0310-9956-ffa450edef68 --- server/log.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/server/log.c b/server/log.c index 641d256af6..8e19fc1b0b 100644 --- a/server/log.c +++ b/server/log.c @@ -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); } /* -- 2.40.0