-clarify comments
authorChristian Grothoff <christian@grothoff.org>
Tue, 26 Jun 2012 11:27:08 +0000 (11:27 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 26 Jun 2012 11:27:08 +0000 (11:27 +0000)
src/transport/gnunet-service-transport_neighbours.c

index 4f4dbfefada2e61f9768d38b3d107683b444b0d8..9c7a70a96bb85974b902b8723b909341ec7d5809 100644 (file)
@@ -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
 };