gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: allow destruction while ite


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: allow destruction while iteration is active
Date: Tue, 28 Feb 2017 20:24:26 +0100

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

dold pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 4bf1d97b6 allow destruction while iteration is active
4bf1d97b6 is described below

commit 4bf1d97b60faba3b75e0964678b3834bd859475f
Author: Florian Dold <address@hidden>
AuthorDate: Tue Feb 28 20:24:24 2017 +0100

    allow destruction while iteration is active
---
 src/set/set_api.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/set/set_api.c b/src/set/set_api.c
index 5b5b1b8ee..04a4e4910 100644
--- a/src/set/set_api.c
+++ b/src/set/set_api.c
@@ -349,6 +349,9 @@ handle_iter_done (void *cls,
   set->iteration_id++;
   iter (set->iterator_cls,
         NULL);
+
+  if (GNUNET_YES == set->destroy_requested)
+    GNUNET_SET_destroy (set);
 }
 
 
@@ -733,8 +736,7 @@ GNUNET_SET_destroy (struct GNUNET_SET_Handle *set)
   /* destroying set while iterator is active is currently
      not supported; we should expand the API to allow
      clients to explicitly cancel the iteration! */
-  GNUNET_assert (NULL == set->iterator);
-  if (NULL != set->ops_head)
+  if ( (NULL != set->ops_head) || (NULL != set->iterator) )
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Set operations are pending, delaying set destruction\n");

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



reply via email to

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