-fixing crash, notes
authorChristian Grothoff <christian@grothoff.org>
Sat, 14 Jan 2012 23:16:53 +0000 (23:16 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 14 Jan 2012 23:16:53 +0000 (23:16 +0000)
src/exit/gnunet-daemon-exit.c
src/vpn/gnunet-service-vpn.c

index b0f0d215a19972412db1a4d059e15bddcd9af83b..f5dd1f585b1253eebf4b828dbc9a81a7d2af956c 100644 (file)
  * @author Christian Grothoff
  *
  * TODO:
+ * - need some logging
+ * - need some statistics
+ * - test
+ *
+ * Code cleanup:
  * - factor out crc computations from DNS/EXIT/VPN into shared library?
+ *
+ * Design:
  * - which code should advertise services? the service model is right
  *   now a bit odd, especially as this code DOES the exit and knows
  *   the DNS "name", but OTOH this is clearly NOT the place to advertise
index 3e8178560b5d01d4991b235c808f48abd51c23df..7219471bf061100f174d4a03c14ee8f99f46e745 100644 (file)
@@ -28,6 +28,8 @@
  *
  * TODO:
  * Basics:
+ * - need some logging
+ * - need some statistics
  * - test!
  * - better message queue management (bounded state, drop oldest/RED?)
  * - actually destroy "stale" tunnels once we have too many!
@@ -2086,12 +2088,14 @@ cleanup_destination_client (void *cls,
 static void
 client_disconnect (void *cls, struct GNUNET_SERVER_Client *client)
 {
-  GNUNET_CONTAINER_multihashmap_iterate (tunnel_map,
-                                        &cleanup_tunnel_client,
-                                        client);
-  GNUNET_CONTAINER_multihashmap_iterate (destination_map,
-                                        &cleanup_destination_client,
-                                        client);
+  if (NULL != tunnel_map)
+    GNUNET_CONTAINER_multihashmap_iterate (tunnel_map,
+                                          &cleanup_tunnel_client,
+                                          client);
+  if (NULL != destination_map)
+    GNUNET_CONTAINER_multihashmap_iterate (destination_map,
+                                          &cleanup_destination_client,
+                                          client);
 }