]> granicus.if.org Git - vnstat/commitdiff
fix --importdb that was creating invalid timestamps, broken since 1.15, closes #55
authorTeemu Toivola <git@humdi.net>
Tue, 7 Feb 2017 15:48:56 +0000 (17:48 +0200)
committerTeemu Toivola <git@humdi.net>
Tue, 7 Feb 2017 15:48:56 +0000 (17:48 +0200)
src/vnstat.c

index 8d4508d4290aa71c0b60aa7729ab348fce19199b..94fce16c8b56e335e27d9131c844acc94834486b 100644 (file)
@@ -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);