X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=prometheus.c;h=e58677c13350faa9af4fe1783fbab7f050fc9cca;hp=8301c0d9c8497ffe5b410a19b33c7301a6522976;hb=105c88bcf2ecbb305ec3003907a376b8d5771f8f;hpb=457d52f2dac219d386fc50ffca07b73e85da48d7 diff --git a/prometheus.c b/prometheus.c index 8301c0d..e58677c 100644 --- a/prometheus.c +++ b/prometheus.c @@ -7,7 +7,7 @@ /* Credit: CZFree.Net,Martin Devera,Netdave,Aquarius,Gandalf */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ -/* Modified by: xChaos, 20120516 +/* Modified by: xChaos, 20120610 ludva, 20080415 Prometheus QoS is free software; you can redistribute it and/or @@ -33,7 +33,7 @@ #include "cll1-0.6.2.h" -const char *version = "0.8.3-d"; +const char *version = "0.8.3-e"; /* Version numbers: 0.8.3 is development releases ("beta"), 0.8.4 will be "stable" */ /* Debian(RPM) package versions/patchlevels: 0.7.9-2, 0.8.0-1, 0.8.0-2, etc. */ @@ -1653,10 +1653,11 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); { fprintf(f, ",\n"); } - if(ip->traffic || ip->direct || ip->proxy || ip->upload) + if( ip->lmsid > 0 + && (ip->traffic || ip->direct || ip->proxy || ip->upload)) { - 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); + fprintf(f, " \"%s\":{ \"lms\": %d, \"ip\":\"%s\", \"total\":%Lu, \"down\":%Lu, \"proxy\":%Lu, \"up\":%Lu }", + ip->name, ip->lmsid, ip->addr, ip->traffic, ip->direct, ip->proxy, ip->upload); } jsoncount++; }