[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9864 - GNUnet/src/applications/dv/module
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9864 - GNUnet/src/applications/dv/module |
Date: |
Tue, 22 Dec 2009 20:20:57 +0100 |
Author: nevans
Date: 2009-12-22 20:20:57 +0100 (Tue, 22 Dec 2009)
New Revision: 9864
Modified:
GNUnet/src/applications/dv/module/dv.c
Log:
dv comments for Christian
Modified: GNUnet/src/applications/dv/module/dv.c
===================================================================
--- GNUnet/src/applications/dv/module/dv.c 2009-12-22 13:40:50 UTC (rev
9863)
+++ GNUnet/src/applications/dv/module/dv.c 2009-12-22 19:20:57 UTC (rev
9864)
@@ -1056,6 +1056,19 @@
'delete_neighbor' modified the tree and hence internal
invariants of the iterator were likely broken!
Besides, each neighbor should only appear once anyway... */
+
+ /* Why should each neighbor appear only once??? We are talking about
+ * deleting any nodes that the disconnected node has referred to us!
+ * While the disconnected node itself appears only once, those it has
+ * told us about may abound... If we don't remove them, we are going
+ * to try sending data to peers whose direct connection is gone.
+ *
+ * Also, the way that the heap removal works (for a min or max heap)
+ * the iterator doesn't move because the last node is switched with
+ * the node being removed, so we don't break the iteration unless
+ * the heap is empty but then we still should be okay (we just stop
+ * iterating).
+ */
return GNUNET_NO;
}
return GNUNET_YES;
@@ -1101,6 +1114,11 @@
GNUNET_CONTAINER_heap_iterate (ctx->neighbor_max_heap,
&delete_callback, (void *) peer);
/* delete_callback will free 'neighbor' (and members) */
+
+ /* no, it won't. It will free the neighbor and members contained
+ * in the ctx->extended_neighbors set but not those in the
+ * ctx->direct_neighbors set.
+ */
}
}
GNUNET_mutex_unlock (ctx->dvMutex);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9864 - GNUnet/src/applications/dv/module,
gnunet <=