char *classmap = "/var/lib/misc/prometheus.classes"; /* credit log file */\r
char *html = "/var/www/traffic.html"; /* hall of fame - html version */\r
char *preview = "/var/www/preview.html"; /* hall of fame preview */\r
-char *json = "/var/www/traffic.json"; /* hall of fame - json version */\r
+char *json = "/var/www/logs/traffic.json"; /* hall of fame - json version */\r
char *cmdlog = "/var/log/prometheuslog"; /* command log filename */\r
char *log_dir = "/var/www/logs/"; /* log directory pathname, ended with slash */\r
char *log_url = "/logs/"; /* log directory relative URI prefix (partial URL) */\r
fprintf(f, "{\n");\r
for_each(ip, ips)\r
{\r
- if(jsoncount)\r
- {\r
- fprintf(f, ",\n");\r
- }\r
if( ip->lmsid > 0 \r
&& (ip->traffic || ip->direct || ip->proxy || ip->upload))\r
{\r
+ if(jsoncount)\r
+ {\r
+ fprintf(f, ",\n");\r
+ }\r
fprintf(f, " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu }",\r
ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload);\r
+ jsoncount++;\r
}\r
- jsoncount++;\r
}\r
fprintf(f, "}\n");\r
fclose(f);\r