From 1f13bb8e59cd4f0c1a7bdfcde5599e5c0188d6c2 Mon Sep 17 00:00:00 2001 From: xchaos Date: Sun, 10 Jun 2012 10:37:13 +0000 Subject: [PATCH] json bug fix :-) git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@187 251d49ef-1d17-4917-a970-b30cf55b089b --- prometheus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2