diff options
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 7 |
1 files changed, 6 insertions, 1 deletions
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, | |||
1666 | { | 1666 | { |
1667 | struct GNUNET_PeerIdentity *peer = cls; | 1667 | struct GNUNET_PeerIdentity *peer = cls; |
1668 | struct PeerContext *peer_ctx; | 1668 | struct PeerContext *peer_ctx; |
1669 | uint32_t *channel_flag; | ||
1669 | 1670 | ||
1670 | if (GNUNET_NO == Peers_check_peer_known (peer)) | 1671 | if (GNUNET_NO == Peers_check_peer_known (peer)) |
1671 | {/* We don't want to implicitly create a context that we're about to kill */ | 1672 | {/* We don't want to implicitly create a context that we're about to kill */ |
1672 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1673 | LOG (GNUNET_ERROR_TYPE_WARNING, |
1673 | "channel (%s) without associated context was destroyed\n", | 1674 | "channel (%s) without associated context was destroyed\n", |
1674 | GNUNET_i2s (peer)); | 1675 | GNUNET_i2s (peer)); |
1675 | return; | 1676 | return; |
@@ -1697,12 +1698,16 @@ Peers_cleanup_destroyed_channel (void *cls, | |||
1697 | if (NULL != peer_ctx->send_channel) | 1698 | if (NULL != peer_ctx->send_channel) |
1698 | { | 1699 | { |
1699 | GNUNET_CADET_channel_destroy (peer_ctx->send_channel); | 1700 | GNUNET_CADET_channel_destroy (peer_ctx->send_channel); |
1701 | channel_flag = Peers_get_channel_flag (&peer_ctx->peer_id, Peers_CHANNEL_ROLE_SENDING); | ||
1702 | Peers_set_channel_flag (channel_flag, Peers_CHANNEL_DESTROING); | ||
1700 | peer_ctx->send_channel = NULL; | 1703 | peer_ctx->send_channel = NULL; |
1701 | peer_ctx->mq = NULL; | 1704 | peer_ctx->mq = NULL; |
1702 | } | 1705 | } |
1703 | if (NULL != peer_ctx->recv_channel) | 1706 | if (NULL != peer_ctx->recv_channel) |
1704 | { | 1707 | { |
1705 | GNUNET_CADET_channel_destroy (peer_ctx->recv_channel); | 1708 | GNUNET_CADET_channel_destroy (peer_ctx->recv_channel); |
1709 | channel_flag = Peers_get_channel_flag (&peer_ctx->peer_id, Peers_CHANNEL_ROLE_RECEIVING); | ||
1710 | Peers_set_channel_flag (channel_flag, Peers_CHANNEL_DESTROING); | ||
1706 | peer_ctx->recv_channel = NULL; | 1711 | peer_ctx->recv_channel = NULL; |
1707 | } | 1712 | } |
1708 | /* Set the #Peers_ONLINE flag accordingly */ | 1713 | /* Set the #Peers_ONLINE flag accordingly */ |