From: Teemu Toivola Date: Tue, 7 Feb 2017 15:48:56 +0000 (+0200) Subject: fix --importdb that was creating invalid timestamps, broken since 1.15, closes #55 X-Git-Tag: v1.17~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cf603fbf738367f82593533c14ecaf4ecff4e63;p=vnstat fix --importdb that was creating invalid timestamps, broken since 1.15, closes #55 --- diff --git a/src/vnstat.c b/src/vnstat.c index 8d4508d..94fce16 100644 --- a/src/vnstat.c +++ b/src/vnstat.c @@ -584,8 +584,8 @@ void handleimport(PARAMS *p) printf("Error: validation of imported database failed.\n"); exit(EXIT_FAILURE); } - /* set boot time to zero in order to force counter sync */ - data.btime = 0; + /* set boot time to one in order to force counter sync */ + data.btime = 1; strncpy_nt(data.interface, p->interface, 32); if (writedb(p->interface, p->dirname, 1)) { printf("Database import for \"%s\" completed.\n", data.interface);