Skip to content

Commit 191ad7e

Browse files
committed
Do not override StructuredData=
In case StructuredData= is set, actually use it and do not override it with the SYSLOG_STRUCTURED_DATA= parsed data. Fixes: 205dbe6 ("Actually respect UseSysLogStructuredData= and UseSysLogMsgId= settings")
1 parent 085384d commit 191ad7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/netlog/netlog-manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int manager_read_journal_input(Manager *m) {
198198
message, hostname,
199199
pid,
200200
r >= 0 ? &tv : NULL,
201-
m->structured_data ? structured_data : NULL,
201+
structured_data,
202202
m->syslog_msgid ? msgid : NULL);
203203
}
204204

src/netlog/netlog-protocol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ int format_rfc5424(Manager *m,
150150
/* Eighth: [structured-data] */
151151
if (m->structured_data)
152152
IOVEC_SET_STRING(iov[n++], m->structured_data);
153-
else if (syslog_structured_data)
153+
else if (m->syslog_structured_data && syslog_structured_data)
154154
IOVEC_SET_STRING(iov[n++], syslog_structured_data);
155155
else
156156
IOVEC_SET_STRING(iov[n++], RFC_5424_NILVALUE);

0 commit comments

Comments
 (0)