+
+
+static void
+do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+ if (NULL != client)
+ {
+ GNUNET_CLIENT_disconnect (client);
+ client = NULL;
+ }
+ if (NULL != sctx)
+ {
+ GNUNET_SERVICE_stop (sctx);
+ sctx = NULL;
+ }
+ else
+ {
+ GNUNET_SCHEDULER_shutdown ();
+ }
+}
+
+