From: Christian Grothoff Date: Thu, 15 Apr 2010 08:37:40 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~22160 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b6824ee9df175c4fdf6d60e425e531ae39dec0b2;p=oweals%2Fgnunet.git fix --- diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 1c93b88f3..c305825b8 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -2582,7 +2582,15 @@ handle_p2p_get (void *cls, bits = 0; cps = GNUNET_CONTAINER_multihashmap_get (connected_peers, &other->hashPubKey); - GNUNET_assert (NULL != cps); + if (NULL == cps) + { + /* peer must have just disconnected */ + GNUNET_STATISTICS_update (stats, + gettext_noop ("# requests dropped due to initiator not being connected"), + 1, + GNUNET_NO); + return GNUNET_SYSERR; + } if (0 != (bm & GET_MESSAGE_BIT_RETURN_TO)) cp = GNUNET_CONTAINER_multihashmap_get (connected_peers, &opt[bits++]);