From 1c004f157fcfa04aa9b9361266fb2b84645c6f33 Mon Sep 17 00:00:00 2001 From: xchaos Date: Wed, 16 May 2012 14:36:17 +0000 Subject: [PATCH] json formatting git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@182 251d49ef-1d17-4917-a970-b30cf55b089b --- prometheus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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++; -- 2.30.2