gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37846 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r37846 - gnunet/src/util
Date: Tue, 30 Aug 2016 13:02:34 +0200

Author: grothoff
Date: 2016-08-30 13:02:34 +0200 (Tue, 30 Aug 2016)
New Revision: 37846

Modified:
   gnunet/src/util/service_new.c
Log:
-recover lost service_main from SVN 37845

Modified: gnunet/src/util/service_new.c
===================================================================
--- gnunet/src/util/service_new.c       2016-08-29 20:34:24 UTC (rev 37845)
+++ gnunet/src/util/service_new.c       2016-08-30 11:02:34 UTC (rev 37846)
@@ -317,7 +317,7 @@
  * @param cls our `struct GNUNET_SERVICE_Handle`
  */
 static void
-service_main (void *cls)
+service_shutdown (void *cls)
 {
   struct GNUNET_SERVICE_Handle *sh = cls;
   struct GNUNET_SERVICE_Client *client;
@@ -344,6 +344,28 @@
 
 
 /**
+ * First task run by any service.  Initializes our shutdown task,
+ * starts the listening operation on our listen sockets and launches
+ * the custom logic of the application service.
+ *
+ * @param cls our `struct GNUNET_SERVICE_Handle`
+ */
+static void
+service_main (void *cls)
+{
+  struct GNUNET_SERVICE_Handle *sh = cls;
+
+  if (GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN != sh->options)
+    GNUNET_SCHEDULER_add_shutdown (&service_shutdown,
+                                   sh);
+  GNUNET_SERVICE_resume (sh);
+  sh->service_init_cb (sh->cb_cls,
+                       sh->cfg,
+                       sh);
+}
+
+
+/**
  * Parse an IPv4 access control list.
  *
  * @param ret location where to write the ACL (set)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]