From 7bded835a2f74059460e47e54a8a07191b4ee1f0 Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Sun, 11 May 2008 17:03:39 +0000 Subject: [PATCH] Correct calculation --- syslogd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/syslogd.c b/syslogd.c index 2ced37f..c7f2b05 100644 --- a/syslogd.c +++ b/syslogd.c @@ -1700,10 +1700,12 @@ void logmsg(pri, msg, from, flags) repeatinterval[f->f_repeatcount]); if (f->f_prevcount == 1 && DupesPending++ == 0) { + int seconds; dprintf("setting alarm to flush duplicate messages\n"); - LastAlarm -= alarm(0); - MarkSeq += LastAlarm; + seconds = alarm(0); + MarkSeq += LastAlarm - seconds; + LastAlarm = seconds; if (LastAlarm > TIMERINTVL) LastAlarm = TIMERINTVL; alarm(LastAlarm);