summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-07-02 12:48:05 +0200
committerJulius Bünger <buenger@mytum.de>2018-07-02 12:49:16 +0200
commitbb3371542e3c1fff2c4abb4d2ba3decf925b4352 (patch)
tree0af399e4100dcc93f16d192936ed91b5982ea25e
parent76cba102f24b8d6e356b36e63474cd6896a082aa (diff)
rps service: set delete flags on channel properly
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/rps/gnunet-service-rps.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 38fa52508..8a95064a6 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -325,6 +325,7 @@ src/rps/gnunet-service-rps_sampler.c
src/rps/gnunet-service-rps_sampler_elem.c
src/rps/gnunet-service-rps_view.c
src/rps/rps_api.c
+src/rps/rps_test_lib.c
src/rps/rps-test_util.c
src/scalarproduct/gnunet-scalarproduct.c
src/scalarproduct/gnunet-service-scalarproduct_alice.c
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 84fb33be2..5a75ac55a 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1666,10 +1666,11 @@ Peers_cleanup_destroyed_channel (void *cls,
{
struct GNUNET_PeerIdentity *peer = cls;
struct PeerContext *peer_ctx;
+ uint32_t *channel_flag;
if (GNUNET_NO == Peers_check_peer_known (peer))
{/* We don't want to implicitly create a context that we're about to kill */
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_WARNING,
"channel (%s) without associated context was destroyed\n",
GNUNET_i2s (peer));
return;
@@ -1697,12 +1698,16 @@ Peers_cleanup_destroyed_channel (void *cls,
if (NULL != peer_ctx->send_channel)
{
GNUNET_CADET_channel_destroy (peer_ctx->send_channel);
+ channel_flag = Peers_get_channel_flag (&peer_ctx->peer_id, Peers_CHANNEL_ROLE_SENDING);
+ Peers_set_channel_flag (channel_flag, Peers_CHANNEL_DESTROING);
peer_ctx->send_channel = NULL;
peer_ctx->mq = NULL;
}
if (NULL != peer_ctx->recv_channel)
{
GNUNET_CADET_channel_destroy (peer_ctx->recv_channel);
+ channel_flag = Peers_get_channel_flag (&peer_ctx->peer_id, Peers_CHANNEL_ROLE_RECEIVING);
+ Peers_set_channel_flag (channel_flag, Peers_CHANNEL_DESTROING);
peer_ctx->recv_channel = NULL;
}
/* Set the #Peers_ONLINE flag accordingly */