From: William A. Rowe Jr Date: Tue, 10 May 2005 23:32:38 +0000 (+0000) Subject: Fix an irritating bug. The forensic-id is captured in two places, as X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43318b6e59827ff90c60aa01c7fbd1fa80c5d5d4;p=thirdparty%2Fapache%2Fhttpd.git Fix an irritating bug. The forensic-id is captured in two places, as an r->notes entry, and in the (supposedly constant) server config(!) This patch retrieves the r->notes copy instead at final logging phase. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@169534 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/standard/mod_log_forensic.c b/src/modules/standard/mod_log_forensic.c index 14b9ff193c8..6d27e3470ea 100644 --- a/src/modules/standard/mod_log_forensic.c +++ b/src/modules/standard/mod_log_forensic.c @@ -227,18 +227,18 @@ static int log_after(request_rec *r) { fcfg *cfg = ap_get_module_config(r->server->module_config, &log_forensic_module); + const char *id; char *s; - rcfg *rcfg; - + if(cfg->fd < 0) return DECLINED; - rcfg = ap_get_module_config(r->request_config, &log_forensic_module); + id = ap_table_get(r->notes, "forensic-id"); - if (!rcfg) + if (!id) return DECLINED; - s = ap_pstrcat(r->pool, "-", rcfg->id, "\n", NULL); + s = ap_pstrcat(r->pool, "-", id, "\n", NULL); write(cfg->fd, s, strlen(s)); return OK;