gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9878 - GNUnet/src/applications/dv/module


From: gnunet
Subject: [GNUnet-SVN] r9878 - GNUnet/src/applications/dv/module
Date: Wed, 23 Dec 2009 19:34:50 +0100

Author: grothoff
Date: 2009-12-23 19:34:50 +0100 (Wed, 23 Dec 2009)
New Revision: 9878

Modified:
   GNUnet/src/applications/dv/module/dv.c
Log:
fix other concurrent-modification issue

Modified: GNUnet/src/applications/dv/module/dv.c
===================================================================
--- GNUnet/src/applications/dv/module/dv.c      2009-12-23 18:30:24 UTC (rev 
9877)
+++ GNUnet/src/applications/dv/module/dv.c      2009-12-23 18:34:50 UTC (rev 
9878)
@@ -1125,12 +1125,11 @@
 
   GNUNET_GE_ASSERT (NULL, neighbor->referee_head == NULL);
   GNUNET_GE_ASSERT (NULL, neighbor->referee_tail == NULL);
-  /* FIXME: this modifies the hash map that we are iterating over! */
   GNUNET_multi_hash_map_remove (ctx.direct_neighbors,
                                key,
                                value);
   GNUNET_free (neighbor);
-  return GNUNET_YES;
+  return GNUNET_NO;
 }
 
 
@@ -1158,7 +1157,7 @@
   GNUNET_cron_del_job (coreAPI->cron, &maintain_dv_job,
                        GNUNET_DV_MAINTAIN_FREQUENCY, NULL);
   GNUNET_multi_hash_map_iterate (ctx.extended_neighbors, 
&distant_neighbor_free_iterator, NULL);
-  GNUNET_multi_hash_map_iterate (ctx.direct_neighbors, 
&direct_neighbor_free_iterator, NULL);
+  while (0 != GNUNET_multi_hash_map_iterate (ctx.direct_neighbors, 
&direct_neighbor_free_iterator, NULL));
   GNUNET_multi_hash_map_destroy (ctx.extended_neighbors);
   GNUNET_multi_hash_map_destroy (ctx.direct_neighbors);
   GNUNET_CONTAINER_heap_destroy (ctx.neighbor_max_heap);





reply via email to

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