From: Florian Forster Date: Mon, 23 Feb 2009 14:38:29 +0000 (+0100) Subject: logfile plugin: Interpret `(notification_t *)->time == 0' as `now'. X-Git-Tag: collectd-4.7.0~114^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6f521e7354231aa7cba61ea4066f2749aee6932a;p=collectd.git logfile plugin: Interpret `(notification_t *)->time == 0' as `now'. --- diff --git a/src/logfile.c b/src/logfile.c index 8e98c047..03af7a3f 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -187,7 +187,8 @@ static int logfile_notification (const notification_t *n, buf[sizeof (buf) - 1] = '\0'; - logfile_print (buf, n->time); + logfile_print (buf, + (n->time > 0) ? n->time : time (NULL)); return (0); } /* int logfile_notification */