[syslog-ng] [Bug 238] syslog-protocol: allow NILVALUE for TIMESTAMP as specified in rfc5424
bugzilla at bugzilla.balabit.com
bugzilla at bugzilla.balabit.com
Mon Jul 1 22:12:44 CEST 2013
https://bugzilla.balabit.com/show_bug.cgi?id=238
--- Comment #5 from Vincent Brillault <spam at lerya.net> 2013-07-01 22:12:44 ---
I currently do not have the time to write such unit tests, sorry (And I lack knowledge on correct time formatting).
After re-reading the code, one thing is different between your patch and mine: you do not return immediately.
As a result, the following block is called ( https://github.com/balabit/syslog-ng-3.4/blob/master/modules/syslogformat/syslog-format.c#L430 ):
'''
if (self->timestamps[LM_TS_STAMP].zone_offset == -1)
{
self->timestamps[LM_TS_STAMP].zone_offset = assume_timezone;
}
if (self->timestamps[LM_TS_STAMP].zone_offset == -1)
{
self->timestamps[LM_TS_STAMP].zone_offset = get_local_timezone_ofs(self->timestamps[LM_TS_STAMP].tv_sec);
}
self->timestamps[LM_TS_STAMP].tv_sec = self->timestamps[LM_TS_STAMP].tv_sec +
get_local_timezone_ofs(self->timestamps[LM_TS_STAMP].tv_sec) -
(tm.tm_hour - unnormalized_hour) * 3600 - self->timestamps[LM_TS_STAMP].zone_offset;
'''
I do not see a similar pattern on the "error" path ( https://github.com/balabit/syslog-ng-3.4/blob/master/modules/syslogformat/syslog-format.c#L1090 ):
'''
if (G_UNLIKELY(!success))
{
gchar buf[2048];
self->timestamps[LM_TS_STAMP] = self->timestamps[LM_TS_RECVD];
[... Nothing on timestamps afterwards ...]
'''
Am I missing something/Is it intended ?
--
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the syslog-ng
mailing list