Fix assert when buffer->hostname == NULL at startup
Default to use 'from' in RFC3164 parser, just like the RFC5424 parser already does. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
0435139ec9
commit
dd5b470342
@ -1100,6 +1100,9 @@ parsemsg_rfc3164(const char *from, int pri, char *msg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buffer.hostname == NULL || !RemoteHostname)
|
||||||
|
buffer.hostname = (char *)from;
|
||||||
|
|
||||||
/* Remove the TAG, if present. */
|
/* Remove the TAG, if present. */
|
||||||
parsemsg_rfc3164_app_name_procid(&msg, &buffer.app_name, &buffer.proc_id);
|
parsemsg_rfc3164_app_name_procid(&msg, &buffer.app_name, &buffer.proc_id);
|
||||||
parsemsg_remove_unsafe_characters(msg, line, sizeof(line));
|
parsemsg_remove_unsafe_characters(msg, line, sizeof(line));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user