diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-26 09:50:37 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2013-01-26 09:50:37 +0000 |
commit | bf47666c0dfb80a031d64234a5cd7c6bf3ee01f2 (patch) | |
tree | 60a19634db750591788057ae137b766aa4f034d0 /src/arm/test_exponential_backoff.c | |
parent | 4a3d191b07338c8e22b28c102ce85c5fa3623c24 (diff) |
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.
git-svn-id: https://gnunet.org/svn/gnunet@25919 140774ce-b5e7-0310-ab8b-a85725594a96
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 34ebad1644..19ca585211 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c @@ -355,7 +355,20 @@ static void task (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) { + char *armconfig; cfg = c; + 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); + } arm = GNUNET_ARM_connect (cfg, NULL); #if START_ARM |