json formatting
authorxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Wed, 16 May 2012 14:36:17 +0000 (14:36 +0000)
committerxchaos <xchaos@251d49ef-1d17-4917-a970-b30cf55b089b>
Wed, 16 May 2012 14:36:17 +0000 (14:36 +0000)
git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@182 251d49ef-1d17-4917-a970-b30cf55b089b

prometheus.c

index 59e2759..d241618 100644 (file)
@@ -656,8 +656,7 @@ void get_traffic_statistics(void)
      }\r
     }  \r
   }\r
-\r
- free(cmd);\r
+  free(cmd);\r
 }\r
  \r
 /* ========== This function executes, logs OR ALSO prints command ========== */\r
@@ -689,7 +688,7 @@ void run_restore(void)
  string(restor,STRLEN);\r
 \r
  /*-----------------------------------------------------------------*/\r
- printf("Running %s <%s ...\n",iptablesrestore,iptablesfile);\r
+ printf("Running %s <%s ...\n", iptablesrestore, iptablesfile);\r
  /*-----------------------------------------------------------------*/\r
  \r
  save_line("COMMIT");\r
@@ -1643,7 +1642,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version);
     }\r
     if(ip->traffic || ip->direct || ip->proxy || ip->upload)\r
     {\r
-     fprintf(f, "%d:{\"ip\":%s, \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu}\n",\r
+     fprintf(f, " %d:{ \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu }",\r
                 ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload);\r
     }\r
     jsoncount++;\r
This page took 0.16 seconds and 4 git commands to generate.