aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerinfo')
-rw-r--r--src/peerinfo/peerinfo_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index 570a5dc1f4..c13224e83f 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -749,9 +749,6 @@ GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic)
struct GNUNET_PEERINFO_Handle *h;
h = ic->h;
- GNUNET_CONTAINER_DLL_remove (h->ic_head,
- h->ic_tail,
- ic);
if (GNUNET_SCHEDULER_NO_TASK != ic->timeout_task)
{
GNUNET_SCHEDULER_cancel (ic->timeout_task);
@@ -760,6 +757,9 @@ GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic)
ic->callback = NULL;
if (GNUNET_YES == ic->in_receive)
return; /* need to finish processing */
+ GNUNET_CONTAINER_DLL_remove (h->ic_head,
+ h->ic_tail,
+ ic);
if (NULL != ic->ac)
{
GNUNET_CONTAINER_DLL_remove (h->ac_head, h->ac_tail, ic->ac);