[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/03: rps: flagging channels while destruction
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/03: rps: flagging channels while destruction |
Date: |
Fri, 29 Dec 2017 15:42:21 +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 a8b68db5ecda35da151e05ce7f475675d276996e
Author: Julius Bünger <address@hidden>
AuthorDate: Fri Dec 29 15:38:55 2017 +0100
rps: flagging channels while destruction
---
src/rps/gnunet-service-rps.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 0b9e3e537..2f0b2c579 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2568,6 +2568,7 @@ cleanup_destroyed_channel (void *cls,
{
struct GNUNET_PeerIdentity *peer = cls;
uint32_t *channel_flag;
+ struct PeerContext *peer_ctx;
if (GNUNET_NO == Peers_check_peer_known (peer))
{ /* We don't know a context to that peer */
@@ -2577,6 +2578,15 @@ cleanup_destroyed_channel (void *cls,
return;
}
+ peer_ctx = get_peer_ctx (peer);
+ if (GNUNET_YES == Peers_check_channel_role (peer, channel,
Peers_CHANNEL_ROLE_RECEIVING))
+ {
+ set_channel_flag (peer_ctx->recv_channel_flags, Peers_CHANNEL_DESTROING);
+ } else if (GNUNET_YES == Peers_check_channel_role (peer, channel,
Peers_CHANNEL_ROLE_SENDING))
+ {
+ set_channel_flag (peer_ctx->send_channel_flags, Peers_CHANNEL_DESTROING);
+ }
+
if (GNUNET_YES == Peers_check_peer_flag (peer, Peers_TO_DESTROY))
{ /* We are in the middle of removing that peer from our knowledge. In this
case simply make sure that the channels are cleaned. */
--
To stop receiving notification emails like this one, please contact
address@hidden