/** * Call MESH's meta API, get all tunnels known to a peer. * * @param cls Closure (unused). * @param tc TaskContext */ static void get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown\n"); return; } GNUNET_MESH_get_tunnels (mh, &tunnels_callback, NULL); }
/** * Call MESH's monitor API, get all tunnels known to peer. * * @param cls Closure (unused). * @param tc TaskContext */ static void get_tunnels (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) { return; } GNUNET_MESH_get_tunnels (mh, &tunnels_callback, NULL); if (GNUNET_YES != monitor_connections) { GNUNET_SCHEDULER_shutdown(); } }