(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 8 Jun 2010 07:56:41 +0000 (07:56 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 8 Jun 2010 07:56:41 +0000 (07:56 +0000)
src/hostlist/hostlist-client.c

index a510ec6450bf8bab48b0fb11b5b8f9d3a65b14fc..89abc09006d9b77ea11e217e96bfc816bdece4d1 100644 (file)
@@ -1187,11 +1187,17 @@ handler_disconnect (void *cls,
                    const struct
                    GNUNET_PeerIdentity * peer)
 {
-  stat_connection_count--;
-  GNUNET_STATISTICS_update (stats, 
-                           gettext_noop ("# active connections"), 
-                           -1, 
-                           GNUNET_NO);  
+  if (stat_connection_count > 0)
+  {
+    stat_connection_count--;
+    GNUNET_STATISTICS_update (stats,
+                              gettext_noop ("# active connections"),
+                              -1,
+                              GNUNET_NO);
+    return;
+  }
+  GNUNET_break(0);
+
 }
 
 /**