/** * Task run during shutdown. * * @param cls unused */ static void shutdown_task (void *cls) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutting down\n"); shutting_down = GNUNET_YES; GCO_shutdown (); if (NULL != stats) { GNUNET_STATISTICS_destroy (stats, GNUNET_NO); stats = NULL; } if (NULL != open_ports) { GNUNET_CONTAINER_multihashmap_destroy (open_ports); open_ports = NULL; } if (NULL != loose_channels) { GNUNET_CONTAINER_multihashmap_destroy (loose_channels); loose_channels = NULL; } /* All channels, connections and CORE must be down before this point. */ GCP_destroy_all_peers (); if (NULL != peers) { GNUNET_CONTAINER_multipeermap_destroy (peers); peers = NULL; } if (NULL != connections) { GNUNET_CONTAINER_multishortmap_destroy (connections); connections = NULL; } if (NULL != ats_ch) { GNUNET_ATS_connectivity_done (ats_ch); ats_ch = NULL; } GCD_shutdown (); GCH_shutdown (); GNUNET_free_non_null (my_private_key); my_private_key = NULL; }
/** * Task run during shutdown. * * @param cls unused * @param tc unused */ static void shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shutting down\n"); shutting_down = GNUNET_YES; GML_shutdown (); GCH_shutdown (); GCC_shutdown (); GCT_shutdown (); GCD_shutdown (); GCP_shutdown (); GNUNET_STATISTICS_destroy (stats, GNUNET_NO); stats = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "shut down\n"); }