From: Christian Grothoff Date: Sat, 14 Jan 2012 23:16:53 +0000 (+0000) Subject: -fixing crash, notes X-Git-Tag: initial-import-from-subversion-38251~15306 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a72a1c6fc09216c5be7f5ee697ff55cf66907c80;p=oweals%2Fgnunet.git -fixing crash, notes --- diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index b0f0d215a..f5dd1f585 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c @@ -25,7 +25,14 @@ * @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 diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index 3e8178560..7219471bf 100644 --- a/src/vpn/gnunet-service-vpn.c +++ b/src/vpn/gnunet-service-vpn.c @@ -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); }