aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rps/gnunet-service-rps.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 874a5af0e..323a03bb2 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1750,9 +1750,17 @@ cleanup_channel (void *cls,
1750 if (NULL == peer_ctx) /* It could have been removed by shutdown_task */ 1750 if (NULL == peer_ctx) /* It could have been removed by shutdown_task */
1751 return; 1751 return;
1752 1752
1753 /* Somwewhat {ab,re}use the iterator function */ 1753 if (channel == peer_ctx->send_channel)
1754 /* Cast to void is ok, because it's used as void in peer_remove_cb */ 1754 { /* Peer probably went down */
1755 (void) peer_remove_cb ((void *) channel, peer, peer_ctx); 1755 rem_from_list (&gossip_list, &gossip_list_size, peer);
1756 rem_from_list (&pending_pull_reply_list, &pending_pull_reply_list_size, peer);
1757
1758 /* Somwewhat {ab,re}use the iterator function */
1759 /* Cast to void is ok, because it's used as void in peer_remove_cb */
1760 (void) peer_remove_cb ((void *) channel, peer, peer_ctx);
1761 }
1762 else
1763 peer_ctx->recv_channel = NULL;
1756 } 1764 }
1757} 1765}
1758 1766