logfile plugin: Interpret `(notification_t *)->time == 0' as `now'.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 23 Feb 2009 14:38:29 +0000 (15:38 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Mon, 23 Feb 2009 14:38:29 +0000 (15:38 +0100)
src/logfile.c

index 8e98c04..03af7a3 100644 (file)
@@ -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 */