summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-08-13 19:08:02 +0200
committerJulius Bünger <buenger@mytum.de>2018-08-13 19:08:02 +0200
commitb67807b3e8f732054506fb4e229e392013ece923 (patch)
tree90ecea0b114171cbcc9f55eaeccd3790c571888a
parentb3e39566bfdda23522a468a93267bc97bf8e6491 (diff)
Fix documentation and assertions
-rw-r--r--src/rps/gnunet-service-rps.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 41769ca24..1f155b14f 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -625,7 +625,7 @@ add_channel_ctx (struct PeerContext *peer_ctx)
/**
- * @brief Remove the channel context from the DLL and free the memory.
+ * @brief Free memory and NULL pointers.
*
* @param channel_ctx The channel context.
*/
@@ -645,10 +645,6 @@ remove_channel_ctx (struct ChannelCtx *channel_ctx)
GNUNET_free (channel_ctx);
peer_ctx->recv_channel_ctx = NULL;
}
- else
- {
- GNUNET_assert (0);
- }
}
@@ -869,14 +865,14 @@ check_operation_scheduled (const struct GNUNET_PeerIdentity *peer,
static void
destroy_channel (struct ChannelCtx *channel_ctx)
{
- struct PeerContext *peer_ctx = channel_ctx->peer_ctx;
struct GNUNET_CADET_Channel *channel;
-
+
if (NULL != channel_ctx->destruction_task)
{
GNUNET_SCHEDULER_cancel (channel_ctx->destruction_task);
channel_ctx->destruction_task = NULL;
}
+ GNUNET_assert (channel_ctx->channel != NULL);
channel = channel_ctx->channel;
channel_ctx->channel = NULL;
GNUNET_CADET_channel_destroy (channel);