gnunet-svn
[Top][All Lists]
Advanced

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

[taler-sync] branch master updated: fix #8030


From: gnunet
Subject: [taler-sync] branch master updated: fix #8030
Date: Sun, 28 Jan 2024 19:39:34 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository sync.

The following commit(s) were added to refs/heads/master by this push:
     new 7623687  fix #8030
7623687 is described below

commit 7623687e5146810582a2c6b3d0d948f405bbeda8
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jan 28 19:39:31 2024 +0100

    fix #8030
---
 debian/sync-httpd.service |  2 ++
 src/sync/sync-httpd.c     | 14 +++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/debian/sync-httpd.service b/debian/sync-httpd.service
index 4138027..6d8fe98 100644
--- a/debian/sync-httpd.service
+++ b/debian/sync-httpd.service
@@ -5,7 +5,9 @@ Description=Sync backup backend
 User=sync-httpd
 Type=simple
 Restart=always
+RestartMode=direct
 RestartSec=1s
+RestartPreventExitStatus=2 3 4 5 6 9
 RuntimeMaxSec=3600s
 ExecStart=/usr/bin/sync-httpd -c /etc/sync/sync.conf
 
diff --git a/src/sync/sync-httpd.c b/src/sync/sync-httpd.c
index 0c9823a..93b844e 100644
--- a/src/sync/sync-httpd.c
+++ b/src/sync/sync-httpd.c
@@ -77,7 +77,7 @@ static struct GNUNET_SCHEDULER_Task *mhd_task;
 /**
  * Global return code
  */
-static int result;
+static int global_ret;
 
 /**
  * The MHD Daemon
@@ -539,7 +539,7 @@ run (void *cls,
   if (SH_sync_connection_close)
     go |= TALER_MHD_GO_FORCE_CONNECTION_CLOSE;
   TALER_MHD_setup (go);
-  result = EXIT_NOTCONFIGURED;
+  global_ret = EXIT_NOTCONFIGURED;
   GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
                                  NULL);
   if (GNUNET_OK !=
@@ -642,7 +642,7 @@ run (void *cls,
   if (NULL ==
       (db = SYNC_DB_plugin_load (config)))
   {
-    result = EXIT_NOTINSTALLED;
+    global_ret = EXIT_NOTCONFIGURED;
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
@@ -660,7 +660,7 @@ run (void *cls,
   if ( (0 == port) &&
        (-1 == fh) )
   {
-    result = EXIT_NOPERMISSION;
+    global_ret = EXIT_NO_RESTART;
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
@@ -676,13 +676,13 @@ run (void *cls,
                           MHD_OPTION_END);
   if (NULL == mhd)
   {
-    result = EXIT_FAILURE;
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed to launch HTTP service, exiting.\n");
+    global_ret = EXIT_NO_RESTART;
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
-  result = EXIT_SUCCESS;
+  global_ret = EXIT_SUCCESS;
   mhd_task = prepare_daemon ();
 }
 
@@ -741,5 +741,5 @@ main (int argc,
     return EXIT_SUCCESS;
   if (GNUNET_SYSERR == ret)
     return EXIT_INVALIDARGUMENT;
-  return result;
+  return global_ret;
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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