From 87a89687d301063019223e8cc6b393eefe625985 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 26 Jun 2012 11:27:08 +0000 Subject: -clarify comments --- src/transport/gnunet-service-transport_neighbours.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 4f4dbfefa..9c7a70a96 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -368,7 +368,13 @@ enum State S_DISCONNECT, /** - * We're finished with the disconnect; clean up state now! + * We're finished with the disconnect; and are cleaning up the state + * now! We put the struct into this state when we are really in the + * task that calls 'free' on it and are about to remove the record + * from the map. We should never find a 'struct NeighbourMapEntry' + * in this state in the map. Accessing a 'struct NeighbourMapEntry' + * in this state virtually always means using memory that has been + * freed (the exception being the cleanup code in 'free_neighbour'). */ S_DISCONNECT_FINISHED }; -- cgit v1.2.3