From 776895eeac1e0936824ab4419ed5bbf77878576c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 25 Aug 2000 21:10:05 +0000 Subject: log_day_change was never printed in logs. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@629 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/log.c') diff --git a/src/core/log.c b/src/core/log.c index 1ca26a73..92f90043 100644 --- a/src/core/log.c +++ b/src/core/log.c @@ -170,17 +170,19 @@ void log_write_rec(LOG_REC *log, const char *str) day = tm->tm_mday; tm = localtime(&log->last); + day -= tm->tm_mday; /* tm breaks in log_rotate_check() .. */ if (tm->tm_hour != hour) { /* hour changed, check if we need to rotate log file */ log_rotate_check(log); } - if (tm->tm_mday != day) { + if (day != 0) { /* day changed */ log_write_timestamp(log->handle, settings_get_str("log_day_changed"), "\n", now); } + log->last = now; log_write_timestamp(log->handle, log_timestamp, str, now); -- cgit v1.2.3