1.18 / <not released yet>
+ - Fix: Misspellings, compiler warnings and possible error situations
+ (pull requests by Christian Göttsche)
+ - Add RTC sanity check and sync wait to daemon startup, the possible wait
+ duration can be configured using the TimeSyncWait keyword
+ - Add optional parameter to --oneline output for forcing fields to output
+ in bytes
+
1.17 / 16-Feb-2017
-.TH VNSTAT 1 "FEBRUARY 2017" "version 1.17" "User Manuals"
+.TH VNSTAT 1 "FEBRUARY 2018" "version 1.18" "User Manuals"
.SH NAME
vnstat \- a console-based network traffic monitor
-.TH VNSTAT.CONF 5 "FEBRUARY 2017" "version 1.17" "User Manuals"
+.TH VNSTAT.CONF 5 "FEBRUARY 2018" "version 1.18" "User Manuals"
.SH NAME
vnstat.conf \- vnStat configuration file
-.TH VNSTATD 1 "FEBRUARY 2017" "version 1.17" "User Manuals"
+.TH VNSTATD 1 "FEBRUARY 2018" "version 1.18" "User Manuals"
.SH NAME
vnstatd \- daemon based database updating for vnStat
-.TH VNSTATI 1 "FEBRUARY 2017" "version 1.17" "User Manuals"
+.TH VNSTATI 1 "FEBRUARY 2018" "version 1.18" "User Manuals"
.SH NAME
vnstati \- png image output support for vnStat
}
} else {
if (debug) {
- data.interface[sizeof(data.interface) - 1] = 0;
+ data.interface[sizeof(data.interface) - 1] = '\0';
printf("db: Database loaded for interface \"%s\"...\n", data.interface);
}
}
- data.interface[sizeof(data.interface) - 1] = 0;
- data.nick[sizeof(data.nick) - 1] = 0;
+ data.interface[sizeof(data.interface) - 1] = '\0';
+ data.nick[sizeof(data.nick) - 1] = '\0';
if (data.version == DBVERSION) {
if (!validatedb() && !force) {
}
} else {
if (debug) {
- data.interface[sizeof(data.interface) - 1] = 0;
+ data.interface[sizeof(data.interface) - 1] = '\0';
printf("db: Backup database loaded for interface \"%s\"...\n", data.interface);
}
}
- data.interface[sizeof(data.interface) - 1] = 0;
- data.nick[sizeof(data.nick) - 1] = 0;
+ data.interface[sizeof(data.interface) - 1] = '\0';
+ data.nick[sizeof(data.nick) - 1] = '\0';
if (data.version == DBVERSION) {
if (!validatedb()) {
}
/* add new node if not in list */
- n = (datanode *) malloc(sizeof(datanode));
+ n = (datanode *)malloc(sizeof(datanode));
if (n == NULL) {
return 0;
}
/* add new node if not in list */
- n = (datanode *) malloc(sizeof(datanode));
+ n = (datanode *)malloc(sizeof(datanode));
if (n == NULL) {
return 0;
/* add new node if list is empty */
if (p == NULL) {
- n = (ibwnode *) malloc(sizeof(ibwnode));
+ n = (ibwnode *)malloc(sizeof(ibwnode));
if (n == NULL) {
return 0;
}
/* add new node if not found */
- n = (ibwnode *) malloc(sizeof(ibwnode));
+ n = (ibwnode *)malloc(sizeof(ibwnode));
if (n == NULL) {
return 0;
#endif
/* initialize list */
- *ifacelist = (char *) malloc(sizeof(char));
+ *ifacelist = (char *)malloc(sizeof(char));
if (*ifacelist == NULL) {
panicexit(__FILE__, __LINE__);
}
sscanf(procline, "%63s", temp);
if (strlen(temp)>0 && (isdigit(temp[(strlen(temp)-1)]) || temp[(strlen(temp)-1)]==':')) {
sscanf(temp, "%31[^':']s", interface);
- *ifacelist = (char *) realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(interface) + 2 ) * sizeof(char)) );
+ *ifacelist = (char *)realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(interface) + 2 ) * sizeof(char)) );
if (*ifacelist == NULL) {
panicexit(__FILE__, __LINE__);
}
speed = getifspeed(interface);
if (speed > 0) {
snprintf(temp, 64, "(%u Mbit) ", speed);
- *ifacelist = (char *) realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(temp) + 1 ) * sizeof(char)) );
+ *ifacelist = (char *)realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(temp) + 1 ) * sizeof(char)) );
if (*ifacelist == NULL) {
panicexit(__FILE__, __LINE__);
}
if (di->d_name[0] == '.' || strlen(di->d_name) > 31) {
continue;
}
- *ifacelist = (char *) realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(di->d_name) + 2 ) * sizeof(char)) );
+ *ifacelist = (char *)realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(di->d_name) + 2 ) * sizeof(char)) );
if (*ifacelist == NULL) {
panicexit(__FILE__, __LINE__);
}
speed = getifspeed(di->d_name);
if (speed > 0) {
snprintf(temp, 64, "(%u Mbit) ", speed);
- *ifacelist = (char *) realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(temp) + 1 ) * sizeof(char)) );
+ *ifacelist = (char *)realloc(*ifacelist, ( ( strlen(*ifacelist) + strlen(temp) + 1 ) * sizeof(char)) );
if (*ifacelist == NULL) {
panicexit(__FILE__, __LINE__);
}
/*
-vnStat - Copyright (c) 2002-2016 Teemu Toivola <tst@iki.fi>
+vnStat - Copyright (c) 2002-2018 Teemu Toivola <tst@iki.fi>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
-vnStat daemon - Copyright (c) 2008-2016 Teemu Toivola <tst@iki.fi>
+vnStat daemon - Copyright (c) 2008-2018 Teemu Toivola <tst@iki.fi>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
-vnStat image output - Copyright (c) 2007-2016 Teemu Toivola <tst@iki.fi>
+vnStat image output - Copyright (c) 2007-2018 Teemu Toivola <tst@iki.fi>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by