From: Christian Grothoff Date: Mon, 29 Aug 2016 11:41:10 +0000 (+0000) Subject: -starting with service_new implementation X-Git-Tag: initial-import-from-subversion-38251~318 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0288111c8bd86a7b6c041d1202516b672816d658;p=oweals%2Fgnunet.git -starting with service_new implementation --- diff --git a/src/util/service_new.c b/src/util/service_new.c index 0ea65d5a8..fe38a30d6 100644 --- a/src/util/service_new.c +++ b/src/util/service_new.c @@ -30,6 +30,28 @@ #include "gnunet_resolver_service.h" +/** + * Handle to a service. + */ +struct GNUNET_SERVICE_Handle +{ +}; + + +/** + * Handle to a client that is connected to a service. + */ +struct GNUNET_SERVICE_Client +{ + /** + * Task that warns about missing calls to + * #GNUNET_SERVICE_client_continue(). + */ + struct GNUNET_SCHEDULER_Task *warn_task; + +}; + + /** * Creates the "main" function for a GNUnet service. You * should almost always use the #GNUNET_SERVICE_MAIN macro @@ -136,7 +158,12 @@ GNUNET_SERVICE_client_continue (struct GNUNET_SERVICE_Client *c) void GNUNET_SERVICE_client_disable_continue_warning (struct GNUNET_SERVICE_Client *c) { - GNUNET_break (0); // not implemented + GNUNET_break (NULL != c->warn_task); + if (NULL != c->warn_task) + { + GNUNET_SCHEDULER_cancel (c->warn_task); + c->warn_task = NULL; + } }