gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -rps: fix bugs


From: gnunet
Subject: [gnunet] branch master updated: -rps: fix bugs
Date: Mon, 29 Mar 2021 21:31:59 +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 29be7985d -rps: fix bugs
29be7985d is described below

commit 29be7985d06482beec4304b0f2eb57f23b6ec84d
Author: Julius Bünger <buenger@mytum.de>
AuthorDate: Mon Mar 29 21:29:27 2021 +0200

    -rps: fix bugs
---
 src/rps/gnunet-service-rps.c |  5 ++---
 src/rps/rps-test_util.c      | 16 ++++++++++------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index cccd1a4b3..56eab288e 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -965,8 +965,6 @@ remove_channel_ctx (struct ChannelCtx *channel_ctx)
     channel_ctx->destruction_task = NULL;
   }
 
-  GNUNET_free (channel_ctx);
-
   if (NULL == peer_ctx)
     return;
   if (channel_ctx == peer_ctx->send_channel_ctx)
@@ -978,6 +976,7 @@ remove_channel_ctx (struct ChannelCtx *channel_ctx)
   {
     peer_ctx->recv_channel_ctx = NULL;
   }
+  GNUNET_free (channel_ctx);
 }
 
 
@@ -2802,7 +2801,7 @@ clean_peer (struct Sub *sub,
                                                              peer))) &&
       (GNUNET_NO == View_contains_peer (sub->view, peer)) &&
       (GNUNET_NO == CustomPeerMap_contains_peer (sub->push_map, peer)) &&
-      (GNUNET_NO == CustomPeerMap_contains_peer (sub->push_map, peer)) &&
+      (GNUNET_NO == CustomPeerMap_contains_peer (sub->pull_map, peer)) &&
       (0 == RPS_sampler_count_id (sub->sampler, peer)) &&
       (GNUNET_YES == check_removable (get_peer_ctx (sub->peer_map, peer))))
   {   /* We can safely remove this peer */
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c
index 497225973..6dee20c95 100644
--- a/src/rps/rps-test_util.c
+++ b/src/rps/rps-test_util.c
@@ -152,12 +152,16 @@ close_all_files ()
 {
   int ret;
 
-  ret = GNUNET_CONTAINER_multihashmap_iterate (open_files,
-                                               close_files_iter,
-                                               NULL);
-  GNUNET_CONTAINER_multihashmap_destroy (open_files);
-  open_files = NULL;
-  return ret;
+  if (NULL != open_files)
+  {
+    ret = GNUNET_CONTAINER_multihashmap_iterate (open_files,
+                                                 close_files_iter,
+                                                 NULL);
+    GNUNET_CONTAINER_multihashmap_destroy (open_files);
+    open_files = NULL;
+    return ret;
+  }
+  return GNUNET_YES;
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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