aboutsummaryrefslogtreecommitdiff
path: root/src/arm
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-09 18:46:25 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-09 18:46:25 +0000
commitcb58dc6ce7f7ae53a67a4563985bf4987a7179d9 (patch)
treec6d0cb8634c1361730082eb820ccfebc7605a86a /src/arm
parent941fbd9ba332507b70deadf66dbbe7c5e4fb2d5d (diff)
downloadgnunet-cb58dc6ce7f7ae53a67a4563985bf4987a7179d9.tar.gz
gnunet-cb58dc6ce7f7ae53a67a4563985bf4987a7179d9.zip
-use defaultconfig if config is missing
Diffstat (limited to 'src/arm')
-rw-r--r--src/arm/arm.conf.in1
-rw-r--r--src/arm/gnunet-service-arm.c32
2 files changed, 19 insertions, 14 deletions
diff --git a/src/arm/arm.conf.in b/src/arm/arm.conf.in
index e7620b8ff..403cc5673 100644
--- a/src/arm/arm.conf.in
+++ b/src/arm/arm.conf.in
@@ -10,6 +10,7 @@ DEFAULTSERVICES = topology hostlist dht nse mesh fs
10UNIXPATH = /tmp/gnunet-service-arm.sock 10UNIXPATH = /tmp/gnunet-service-arm.sock
11UNIX_MATCH_UID = YES 11UNIX_MATCH_UID = YES
12UNIX_MATCH_GID = YES 12UNIX_MATCH_GID = YES
13CONFIG = $DEFAULTCONFIG
13 14
14# In the "-l" option, format characters from 'strftime' are allowed; 15# In the "-l" option, format characters from 'strftime' are allowed;
15# In the GLOBAL_POSTFIX, "{}" stands for the name of the respective 16# In the GLOBAL_POSTFIX, "{}" stands for the name of the respective
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index c860a810c..b43a482ba 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -1118,21 +1118,25 @@ setup_service (void *cls, const char *section)
1118 return; 1118 return;
1119 } 1119 }
1120 config = NULL; 1120 config = NULL;
1121 if ((GNUNET_OK != 1121 if (( (GNUNET_OK !=
1122 GNUNET_CONFIGURATION_get_value_filename (cfg, section, "CONFIG", 1122 GNUNET_CONFIGURATION_get_value_filename (cfg, section, "CONFIG",
1123 &config)) || 1123 &config)) &&
1124 (GNUNET_OK !=
1125 GNUNET_CONFIGURATION_get_value_filename (cfg, "PATHS", "DEFAULTCONFIG",
1126 &config)) ) ||
1127
1124 (0 != STAT (config, &sbuf))) 1128 (0 != STAT (config, &sbuf)))
1125 { 1129 {
1126 if (NULL == config) 1130 if (NULL == config)
1127 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, section, "CONFIG"); 1131 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, section, "CONFIG");
1128 else 1132 else
1129 GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING, 1133 GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING,
1130 section, "CONFIG", 1134 section, "CONFIG",
1131 STRERROR (errno)); 1135 STRERROR (errno));
1132 GNUNET_free (binary); 1136 GNUNET_free (binary);
1133 GNUNET_free_non_null (config); 1137 GNUNET_free_non_null (config);
1134 return; 1138 return;
1135 } 1139 }
1136 sl = GNUNET_malloc (sizeof (struct ServiceList)); 1140 sl = GNUNET_malloc (sizeof (struct ServiceList));
1137 sl->name = GNUNET_strdup (section); 1141 sl->name = GNUNET_strdup (section);
1138 sl->binary = binary; 1142 sl->binary = binary;