From: Teemu Toivola Date: Thu, 14 May 2015 14:51:39 +0000 (+0300) Subject: force interface counter sync after database import X-Git-Tag: v1.15~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72ba71c56d8797fce54346fbb9e7b86309e0ed3a;p=vnstat force interface counter sync after database import --- diff --git a/src/vnstat.c b/src/vnstat.c index 66db093..da04e68 100644 --- a/src/vnstat.c +++ b/src/vnstat.c @@ -579,6 +579,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; strncpy_nt(data.interface, p->interface, 32); if (writedb(p->interface, p->dirname, 1)) { printf("Database import for \"%s\" completed.\n", data.interface);