"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common.c" between
vnstat-2.8.tar.gz and vnstat-2.9.tar.gz

About: vnStat is a console-based network traffic monitor (using the /proc filesystem).

common.c  (vnstat-2.8):common.c  (vnstat-2.9)
skipping to change at line 17 skipping to change at line 17
ibwnode *ifacebw; ibwnode *ifacebw;
int debug; int debug;
int noexit; /* = running as daemon if 2 */ int noexit; /* = running as daemon if 2 */
int intsignal; int intsignal;
int pidfile; int pidfile;
int disableprints; int disableprints;
int printe(const PrintType type) int printe(const PrintType type)
{ {
int result = 1; int result = 1;
char timestamp[22];
time_t current;
if (disableprints) { if (disableprints) {
return 1; return 1;
/* daemon running but log not enabled */ /* daemon running but log not enabled */
} else if (noexit == 2 && cfg.uselogging == 0) { } else if (noexit == 2 && cfg.uselogging == 0) {
return 1; return 1;
/* daemon running, log enabled */ /* daemon running, log enabled */
} else if (noexit == 2) { } else if (noexit == 2) {
skipping to change at line 41 skipping to change at line 43
case PT_Info: case PT_Info:
case PT_Infoless: case PT_Infoless:
case PT_Warning: case PT_Warning:
case PT_Error: case PT_Error:
case PT_Config: case PT_Config:
case PT_ShortMultiline: case PT_ShortMultiline:
result = logprint(type); result = logprint(type);
break; break;
} }
/* daemon isn't running */ /* daemon isn't running or is running attached to a terminal */
} else { } else {
if (cfg.timestampprints && type != PT_ShortMultiline) {
current = time(NULL);
strftime(timestamp, 22, DATETIMEFORMAT, localtime(&curren
t));
printf("[%s] ", timestamp);
}
switch (type) { switch (type) {
case PT_Info: case PT_Info:
printf("Info: %s\n", errorstring); printf("Info: %s\n", errorstring);
break; break;
case PT_Infoless: case PT_Infoless:
printf("%s\n", errorstring); printf("%s\n", errorstring);
break; break;
case PT_Warning: case PT_Warning:
printf("Warning: %s\n", errorstring); printf("Warning: %s\n", errorstring);
break; break;
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)