[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 01/02: RPS service: Try to fix peer destruction du
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 01/02: RPS service: Try to fix peer destruction during cleanup |
Date: |
Wed, 31 Oct 2018 12:04:22 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
commit b6395044ac67983a271581839e945027f6c089cf
Author: Julius Bünger <address@hidden>
AuthorDate: Wed Oct 31 11:52:23 2018 +0100
RPS service: Try to fix peer destruction during cleanup
---
src/rps/gnunet-service-rps.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 2e2fa96a7..d129ba746 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2690,6 +2690,14 @@ clean_peer (struct Sub *sub,
#endif /* ENABLE_MALICIOUS */
}
+ if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (sub->peer_map,
peer))
+ {
+ /* Peer was already removed by callback on destroyed channel */
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Peer was removed from our knowledge during cleanup\n");
+ return;
+ }
+
if ( (GNUNET_NO == check_peer_send_intention (get_peer_ctx (sub->peer_map,
peer))) &&
(GNUNET_NO == View_contains_peer (sub->view, peer)) &&
@@ -2729,7 +2737,8 @@ cleanup_destroyed_channel (void *cls,
channel_ctx->channel = NULL;
remove_channel_ctx (channel_ctx);
if (NULL != peer_ctx &&
- peer_ctx->send_channel_ctx == channel_ctx)
+ peer_ctx->send_channel_ctx == channel_ctx &&
+ GNUNET_YES == check_sending_channel_needed (channel_ctx->peer_ctx))
{
remove_peer (peer_ctx->sub, &peer_ctx->peer_id);
}
--
To stop receiving notification emails like this one, please contact
address@hidden