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~127^2~7 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6f521e7354231aa7cba61ea4066f2749aee6932a;hp=aab902bb10a4e0a65abda511e6e362c554a2dcc6;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 */