httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1205061 - /httpd/httpd/trunk/server/log.c
Date Tue, 22 Nov 2011 16:16:52 GMT
Author: minfrin
Date: Tue Nov 22 16:16:51 2011
New Revision: 1205061

URL: http://svn.apache.org/viewvc?rev=1205061&view=rev
Log:
Align the format variable for the raw IP between the error_log and the
access_log.

Modified:
    httpd/httpd/trunk/server/log.c

Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=1205061&r1=1205060&r2=1205061&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Tue Nov 22 16:16:51 2011
@@ -561,7 +561,7 @@ static int cpystrn(char *buf, const char
 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_er
         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(a
     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);
 }
 
 /*



Mime
View raw message