gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r33490 - gnunet/src/exit


From: gnunet
Subject: [GNUnet-SVN] r33490 - gnunet/src/exit
Date: Tue, 3 Jun 2014 11:09:50 +0200

Author: grothoff
Date: 2014-06-03 11:09:50 +0200 (Tue, 03 Jun 2014)
New Revision: 33490

Modified:
   gnunet/src/exit/gnunet-daemon-exit.c
Log:
keep exit process running even if it cannot work to avoid ARM restarts

Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c        2014-06-03 08:41:00 UTC (rev 
33489)
+++ gnunet/src/exit/gnunet-daemon-exit.c        2014-06-03 09:09:50 UTC (rev 
33490)
@@ -3114,11 +3114,31 @@
 
 
 /**
+ * Function scheduled as very last function if the service
+ * disabled itself because the helper is not installed
+ * properly.  Does nothing, except for keeping the
+ * service process alive by virtue of being scheduled.
+ *
+ * @param cls NULL
+ * @param tc scheduler context
+ */
+static void
+dummy_task (void *cls,
+            const struct GNUNET_SCHEDULER_TaskContext *tc)
+{
+  /* just terminate */
+}
+
+
+/**
  * Function scheduled as very last function, cleans up after us
+ *
+ * @param cls NULL
+ * @param tc scheduler context
  */
 static void
 cleanup (void *cls,
-         const struct GNUNET_SCHEDULER_TaskContext *tskctx)
+         const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   unsigned int i;
 
@@ -3511,8 +3531,11 @@
     {
       GNUNET_free (binary);
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                 _("`%s' must be installed SUID, refusing to run\n"),
+                 _("`%s' must be installed SUID, EXIT will not work\n"),
                  "gnunet-helper-exit");
+      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+                                    &dummy_task,
+                                    NULL);
       global_ret = 1;
       return;
     }
@@ -3601,7 +3624,9 @@
     app_idx++;
   }
   GNUNET_free_non_null (dns_exit);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls);
+  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+                                &cleanup,
+                                cls);
 
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_CONNECTIONS",




reply via email to

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