-starting with service_new implementation
authorChristian Grothoff <christian@grothoff.org>
Mon, 29 Aug 2016 11:41:10 +0000 (11:41 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 29 Aug 2016 11:41:10 +0000 (11:41 +0000)
src/util/service_new.c

index 0ea65d5a898ca66eff8ee70c40d4c790a028928c..fe38a30d61c7e3669939e07ddfd17c9b4efa1e3e 100644 (file)
 #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;
+  }
 }