MINOR: log: use NULL for the unique_id if there is no stream

Now s->unique_id is used as NULL (not set) if s==NULL.
This commit is contained in:
Willy Tarreau 2018-09-05 15:49:01 +02:00
parent abd71a5c2e
commit 02fdf4f77b

View File

@ -2504,7 +2504,7 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t
case LOG_FMT_UNIQUEID: // %ID
ret = NULL;
src = s->unique_id;
src = s ? s->unique_id : NULL;
ret = lf_text(tmplog, src, maxsize - (tmplog - dst), tmp);
if (ret == NULL)
goto out;