diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-01-26 09:50:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-01-26 09:50:37 +0000 |
commit | ba007d1a80d1d376712d362881b17d64b36898d8 (patch) | |
tree | 60a19634db750591788057ae137b766aa4f034d0 /src/arm/test_exponential_backoff.c | |
parent | deec9d09189a4e2a2fd52468e9905dcf1b8d023d (diff) | |
download | gnunet-ba007d1a80d1d376712d362881b17d64b36898d8.tar.gz gnunet-ba007d1a80d1d376712d362881b17d64b36898d8.zip |
LRN: Here's a patch. See if it doesn't break anything for you.
Arm service is started with -c <configname> 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.
Diffstat (limited to 'src/arm/test_exponential_backoff.c')
-rw-r--r-- | src/arm/test_exponential_backoff.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index 34ebad164..19ca58521 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -355,7 +355,20 @@ static void | |||
355 | task (void *cls, char *const *args, const char *cfgfile, | 355 | task (void *cls, char *const *args, const char *cfgfile, |
356 | const struct GNUNET_CONFIGURATION_Handle *c) | 356 | const struct GNUNET_CONFIGURATION_Handle *c) |
357 | { | 357 | { |
358 | char *armconfig; | ||
358 | cfg = c; | 359 | cfg = c; |
360 | if (NULL != cfgfile) | ||
361 | { | ||
362 | if (GNUNET_OK != | ||
363 | GNUNET_CONFIGURATION_get_value_filename (cfg, "arm", "CONFIG", | ||
364 | &armconfig)) | ||
365 | { | ||
366 | GNUNET_CONFIGURATION_set_value_string (cfg, "arm", "CONFIG", | ||
367 | cfgfile); | ||
368 | } | ||
369 | else | ||
370 | GNUNET_free (armconfig); | ||
371 | } | ||
359 | 372 | ||
360 | arm = GNUNET_ARM_connect (cfg, NULL); | 373 | arm = GNUNET_ARM_connect (cfg, NULL); |
361 | #if START_ARM | 374 | #if START_ARM |