[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: require gnunet.conf to spec
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: require gnunet.conf to specify which services to run |
Date: |
Sat, 23 Jun 2018 15:51:49 +0200 |
This is an automated email from the git hooks/post-receive script.
lynx pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 92609e8b0 require gnunet.conf to specify which services to run
92609e8b0 is described below
commit 92609e8b088bf1dde6b927dc0e3be2e9092f0f87
Author: psyc://loupsycedyglgamf.onion/~lynX
<ircs://psyced.org/youbroketheinternet>
AuthorDate: Sat Jun 23 13:30:01 2018 +0000
require gnunet.conf to specify which services to run
---
src/arm/gnunet-service-arm.c | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index b56c9c0a8..4f443d0a1 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -235,6 +235,11 @@ static struct GNUNET_DISK_PipeHandle *sigpipe;
static int in_shutdown;
/**
+ * Return value from main
+ */
+static int global_ret;
+
+/**
* Are we starting user services?
*/
static int start_user = GNUNET_YES;
@@ -2219,21 +2224,20 @@ run (void *cls,
else
final_option = GNUNET_CONFIGURATION_expand_dollar (cfg,
final_option);
- if (GNUNET_YES ==
- GNUNET_CONFIGURATION_get_value_yesno (cfg,
+ start_user = GNUNET_CONFIGURATION_get_value_yesno (cfg,
"ARM",
- "USER_ONLY"))
- {
- GNUNET_break (GNUNET_YES == start_user);
- start_system = GNUNET_NO;
- }
- if (GNUNET_YES ==
- GNUNET_CONFIGURATION_get_value_yesno (cfg,
+ "USER_ONLY");
+ start_system = GNUNET_CONFIGURATION_get_value_yesno (cfg,
"ARM",
- "SYSTEM_ONLY"))
+ "SYSTEM_ONLY");
+ if ( (GNUNET_NO == start_user) &&
+ (GNUNET_NO == start_system) )
{
- GNUNET_break (GNUNET_YES == start_system);
- start_user = GNUNET_NO;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Please configure either USER_ONLY or SYSTEM_ONLY or both.\n");
+ GNUNET_SCHEDULER_shutdown ();
+ global_ret = 1;
+ return;
}
GNUNET_CONFIGURATION_iterate_sections (cfg,
&setup_service,
@@ -2260,7 +2264,6 @@ int
main (int argc,
char *const *argv)
{
- int ret;
struct GNUNET_SIGNAL_Context *shc_chld;
struct GNUNET_MQ_MessageHandler handlers[] = {
GNUNET_MQ_hd_var_size (start,
@@ -2294,7 +2297,7 @@ main (int argc,
shc_chld =
GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD,
&sighandler_child_death);
- ret = GNUNET_SERVICE_run_ (argc,
+ if ( GNUNET_OK != GNUNET_SERVICE_run_ (argc,
argv,
"arm",
GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN,
@@ -2302,7 +2305,8 @@ main (int argc,
&client_connect_cb,
&client_disconnect_cb,
NULL,
- handlers);
+ handlers))
+ global_ret = 2;
#if HAVE_WAIT4
if (NULL != wait_file)
{
@@ -2319,7 +2323,7 @@ main (int argc,
shc_chld = NULL;
GNUNET_DISK_pipe_close (sigpipe);
sigpipe = NULL;
- return ret;
+ return global_ret;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: require gnunet.conf to specify which services to run,
gnunet <=