gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: Fix documentation and asser


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: Fix documentation and assertions
Date: Mon, 13 Aug 2018 19:08:29 +0200

This is an automated email from the git hooks/post-receive script.

julius-buenger pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new b67807b3e Fix documentation and assertions
b67807b3e is described below

commit b67807b3e8f732054506fb4e229e392013ece923
Author: Julius Bünger <address@hidden>
AuthorDate: Mon Aug 13 19:08:02 2018 +0200

    Fix documentation and assertions
---
 src/rps/gnunet-service-rps.c | 10 +++-------
 1 file 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);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]