- dont resend useless channel_destroy messages
[oweals/gnunet.git] / src / util / container_heap.c
index b9cab1e9c74959a64322dd8df97e1f4e8992a91f..0f63f957dd5d46acf5755c614aae0b224e0a0d83 100644 (file)
@@ -4,7 +4,7 @@
 
   GNUnet is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
-  by the Free Software Foundation; either version 2, or (at your
+  by the Free Software Foundation; either version 3, or (at your
   option) any later version.
 
   GNUnet is distributed in the hope that it will be useful, but
@@ -400,6 +400,8 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap)
     heap->root = root->left_child;
     insert_node (heap, heap->root, root->right_child);
   }
+  if (heap->walk_pos == root)
+    heap->walk_pos = heap->root;
   GNUNET_free (root);
 #if EXTRA_CHECKS
   GNUNET_assert (((heap->size == 0) && (heap->root == NULL)) ||