From: Matthias Wachs Date: Wed, 3 Nov 2010 09:03:04 +0000 (+0000) Subject: removed assertion since you can not blame hostlist-client how often core dis/connect... X-Git-Tag: initial-import-from-subversion-38251~19861 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1f5e1eed00f160ddbc1e82976cf639519f3fce61;p=oweals%2Fgnunet.git removed assertion since you can not blame hostlist-client how often core dis/connect handlers are called instead code just ensures that the value is >= 0 --- diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index 789ae751f..418c36309 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -1177,12 +1177,18 @@ handler_disconnect (void *cls, const struct GNUNET_PeerIdentity * peer) { - GNUNET_assert (stat_connection_count > 0); + /* GNUNET_assert (stat_connection_count > 0); */ + if (stat_connection_count == 0) + { + GNUNET_break_op (0); + return; + } + stat_connection_count--; GNUNET_STATISTICS_update (stats, - gettext_noop ("# active connections"), - -1, - GNUNET_NO); + gettext_noop ("# active connections"), + -1, + GNUNET_NO); } /**