-fix shutdown
authorChristian Grothoff <christian@grothoff.org>
Sun, 8 Feb 2015 23:22:18 +0000 (23:22 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 8 Feb 2015 23:22:18 +0000 (23:22 +0000)
src/ats/gnunet-service-ats_connectivity.c

index 1ced117ca5f02da0d3ed9692089be8ed731b81d8..e9f1e5398ba7442e9ef414bcb1562f514df73b0f 100644 (file)
@@ -64,6 +64,8 @@ unsigned int
 GAS_connectivity_has_peer (void *cls,
                            const struct GNUNET_PeerIdentity *peer)
 {
+  if (NULL == connection_requests)
+    return 0;
   /* TODO: return sum of 'strength's of connectivity requests */
   return GNUNET_CONTAINER_multipeermap_contains (connection_requests,
                                                  peer);
@@ -218,6 +220,7 @@ GAS_connectivity_done ()
                                          &free_request,
                                          NULL);
   GNUNET_CONTAINER_multipeermap_destroy (connection_requests);
+  connection_requests = NULL;
 }