From: Julius Bünger Date: Thu, 5 Jul 2018 20:05:16 +0000 (+0200) Subject: rps profiler: additional checks and assertions before disconnect from rps X-Git-Tag: v0.11.0~322^2~84 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=411abad7976fb483fb29bddd8982cbe746502b95;p=oweals%2Fgnunet.git rps profiler: additional checks and assertions before disconnect from rps --- diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index dcd72aef1..0427608f1 100644 --- a/src/rps/gnunet-rps-profiler.c +++ b/src/rps/gnunet-rps-profiler.c @@ -1177,8 +1177,12 @@ rps_disconnect_adapter (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "disconnect_adapter()\n"); GNUNET_assert (NULL != peer); - GNUNET_RPS_disconnect (h); - peer->rps_handle = NULL; + if (NULL != peer->rps_handle) + { + GNUNET_assert (h == peer->rps_handle); + GNUNET_RPS_disconnect (h); + peer->rps_handle = NULL; + } }