[syslog-ng] Bugreport: Ver 1.9.5 problems with facility/level filtering

Balazs Scheidler bazsi at balabit.hu
Fri Oct 7 18:18:41 CEST 2005


On Thu, 2005-10-06 at 21:12 +0200, Roberto Nibali wrote:
> > I've added a simple configure check on tm_gmtoff and if it does not
> > exist I fall back to the global "timezone" variable.
> 
> But does the DST handling work correctly in this case?

Well, nobody can tell, but it should. Timezone handling is not really
consistent among UNIXes as it turned out (I did not think it is so
difficult to determine the current offset from UTC)

While checking it out again, I've found that I missed the "return" part
of the return statement. This patch (just committed) should cure that
issue:

--- orig/src/misc.c
+++ mod/src/misc.c
@@ -83,7 +83,7 @@ get_local_timezone_ofs(time_t when)
   tm = localtime(&when);
   return tm->tm_gmtoff;
 #elif HAVE_GLOBAL_TIMEZONE
-  timezone - (tm.tm_isdst > 0 ? 3600 : 0);
+  return timezone - (tm.tm_isdst > 0 ? 3600 : 0);
 #else
   #error "Don't know how to determine current timezone"
 #endif





> So I should not spend time on this issue anymore, right?

I still expect with some portability issues with this one, I also
received a related mail in private which I have not read yet.

-- 
Bazsi



More information about the syslog-ng mailing list