From 08159b18571f395aace0cfa11562517109900305 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20B=C3=BCnger?= Date: Wed, 11 Jul 2018 17:32:58 +0200 Subject: [PATCH] fix rps profiler: clean data structure in time --- src/rps/gnunet-rps-profiler.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index a1728cccf..02259d628 100644 --- a/src/rps/gnunet-rps-profiler.c +++ b/src/rps/gnunet-rps-profiler.c @@ -1353,13 +1353,13 @@ request_peers (void *cls) struct RPSPeer *rps_peer; struct PendingReply *pending_rep; - if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test) - return; rps_peer = pending_req->rps_peer; GNUNET_assert (1 <= rps_peer->num_pending_reqs); GNUNET_CONTAINER_DLL_remove (rps_peer->pending_req_head, rps_peer->pending_req_tail, pending_req); + rps_peer->num_pending_reqs--; + if (GNUNET_YES == in_shutdown || GNUNET_YES == post_test) return; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Requesting one peer\n"); pending_rep = GNUNET_new (struct PendingReply); @@ -1372,7 +1372,6 @@ request_peers (void *cls) rps_peer->pending_rep_tail, pending_rep); rps_peer->num_pending_reps++; - rps_peer->num_pending_reqs--; } -- 2.25.1