From: Thierry FOURNIER Date: Mon, 14 Apr 2014 23:38:48 +0000 (+0200) Subject: BUG/MINOR: log: Don't dump empty unique-id X-Git-Tag: v1.5-dev23~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1be69105abccec526afdf7b94611473312a931db;p=thirdparty%2Fhaproxy.git BUG/MINOR: log: Don't dump empty unique-id If the unique-id value is missing, the build_logline() function dump anything. It is because the function lf_text() is bypassed. This function is responsible to dump '-' is the value is not present, and set the '"' around the value displayed. This fixes the bug reported by Julient Vehent --- diff --git a/src/log.c b/src/log.c index 176a7253a6..efb3d2721c 100644 --- a/src/log.c +++ b/src/log.c @@ -1559,8 +1559,7 @@ int build_logline(struct session *s, char *dst, size_t maxsize, struct list *lis case LOG_FMT_UNIQUEID: // %ID ret = NULL; src = s->unique_id; - if (src) - ret = lf_text(tmplog, src, maxsize - (tmplog - dst), tmp); + ret = lf_text(tmplog, src, maxsize - (tmplog - dst), tmp); if (ret == NULL) goto out; tmplog = ret;