From 0288111c8bd86a7b6c041d1202516b672816d658 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 29 Aug 2016 11:41:10 +0000 Subject: [PATCH] -starting with service_new implementation --- src/util/service_new.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) 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; + } } -- 2.25.1