03_STAT_no-clients.diff
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Mon, 17 Dec 2007 12:12:25 +0000 (13:12 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 17 Dec 2007 12:12:25 +0000 (13:12 +0100)
Avoids messages like
Dec 15 20:01:25 _tiptop 1 stat_client_write: 0 client(s)
which would otherwise flood the debug log.

stat.c

diff --git a/stat.c b/stat.c
index 0457a0f..3d563d2 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -125,7 +125,8 @@ void stat_client_write(const char *msg, int itemnum)
                free(sc);
                dump_stat_client_list();
        }
-       PARA_DEBUG_LOG("%d client(s)\n", num_clients);
+       if (num_clients)
+               PARA_DEBUG_LOG("%d client(s)\n", num_clients);
 }
 
 /**