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)
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)
{
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);
}
/*