From: xchaos Date: Sun, 10 Jun 2012 10:37:13 +0000 (+0000) Subject: json bug fix :-) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=1f13bb8e59cd4f0c1a7bdfcde5599e5c0188d6c2;p=svn%2FPrometheus-QoS%2F.git json bug fix :-) git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@187 251d49ef-1d17-4917-a970-b30cf55b089b --- diff --git a/prometheus.c b/prometheus.c index 8301c0d..8c70bb0 100644 --- a/prometheus.c +++ b/prometheus.c @@ -1653,7 +1653,8 @@ 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);