From ba007d1a80d1d376712d362881b17d64b36898d8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 26 Jan 2013 09:50:37 +0000 Subject: LRN: Here's a patch. See if it doesn't break anything for you. Arm service is started with -c only when the process that runs arm service has "[arm]/CONFIG" defined in the configuration used to run arm service (usually - process' own configuration). Since default [arm] config has no CONFIG defined anymore (thanks to your r25908), we need to add this code to put the config file that was passed to gnunet-arm tool via -c as "[arm]/CONFIG" for arm service to receive it. Otherwise arm service is run without config and reads default config (~/.gnunet/gnunet.conf) instead, which is clearly not what we need. --- src/arm/gnunet-arm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/arm/gnunet-arm.c') diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index ca4193837..1b17e2dfe 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c @@ -291,6 +291,7 @@ static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) { + char *armconfig; cfg = c; config_file = cfgfile; if (GNUNET_CONFIGURATION_get_value_string @@ -300,6 +301,18 @@ run (void *cls, char *const *args, const char *cfgfile, "PATHS", "SERVICEHOME"); return; } + if (NULL != cfgfile) + { + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_filename (cfg, "arm", "CONFIG", + &armconfig)) + { + GNUNET_CONFIGURATION_set_value_string (cfg, "arm", "CONFIG", + cfgfile); + } + else + GNUNET_free (armconfig); + } if (NULL == (h = GNUNET_ARM_connect (cfg, NULL))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, -- cgit v1.2.3