From: xchaos Date: Wed, 16 May 2012 14:36:17 +0000 (+0000) Subject: json formatting X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=1c004f157fcfa04aa9b9361266fb2b84645c6f33;p=svn%2FPrometheus-QoS%2F.git json formatting git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@182 251d49ef-1d17-4917-a970-b30cf55b089b --- diff --git a/prometheus.c b/prometheus.c index 59e2759..d241618 100644 --- a/prometheus.c +++ b/prometheus.c @@ -656,8 +656,7 @@ void get_traffic_statistics(void) } } } - - free(cmd); + free(cmd); } /* ========== This function executes, logs OR ALSO prints command ========== */ @@ -689,7 +688,7 @@ void run_restore(void) string(restor,STRLEN); /*-----------------------------------------------------------------*/ - printf("Running %s <%s ...\n",iptablesrestore,iptablesfile); + printf("Running %s <%s ...\n", iptablesrestore, iptablesfile); /*-----------------------------------------------------------------*/ save_line("COMMIT"); @@ -1643,7 +1642,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); } if(ip->traffic || ip->direct || ip->proxy || ip->upload) { - fprintf(f, "%d:{\"ip\":%s, \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu}\n", + fprintf(f, " %d:{ \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu }", ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload); } jsoncount++;