This bug caused the last line in each journal file to be processed a
second time. Since it had been modified due to tokenizing, it failed
syntax check. The daemon would always record one failed line at
end-of-journal as a result. No data loss incurred by this bug.
---
src/rrd_daemon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c
index abcb788..ead969b 100644
--- a/src/rrd_daemon.c
+++ b/src/rrd_daemon.c
@@ -1508,7 +1508,8 @@ static int journal_replay (const char *file) /* {{{ */
size_t entry_len;
++line;
- fgets(entry, sizeof(entry), fh);
+ if (fgets(entry, sizeof(entry), fh) == NULL)
+ break;
entry_len = strlen(entry);
/* check \n termination in case journal writing crashed mid-line */
--
1.6.0.2
_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers