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_gnunet_service_arm.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_gnunet_service_arm.c')
-rw-r--r-- | src/arm/test_gnunet_service_arm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/arm/test_gnunet_service_arm.c b/src/arm/test_gnunet_service_arm.c index 98d8c6354..d367bc6fe 100644 --- a/src/arm/test_gnunet_service_arm.c +++ b/src/arm/test_gnunet_service_arm.c | |||
@@ -107,6 +107,20 @@ static void | |||
107 | run (void *cls, char *const *args, const char *cfgfile, | 107 | run (void *cls, char *const *args, const char *cfgfile, |
108 | const struct GNUNET_CONFIGURATION_Handle *c) | 108 | const struct GNUNET_CONFIGURATION_Handle *c) |
109 | { | 109 | { |
110 | char *armconfig; | ||
111 | |||
112 | if (NULL != cfgfile) | ||
113 | { | ||
114 | if (GNUNET_OK != | ||
115 | GNUNET_CONFIGURATION_get_value_filename (c, "arm", "CONFIG", | ||
116 | &armconfig)) | ||
117 | { | ||
118 | GNUNET_CONFIGURATION_set_value_string (c, "arm", "CONFIG", | ||
119 | cfgfile); | ||
120 | } | ||
121 | else | ||
122 | GNUNET_free (armconfig); | ||
123 | } | ||
110 | arm = GNUNET_ARM_connect (c, NULL); | 124 | arm = GNUNET_ARM_connect (c, NULL); |
111 | GNUNET_ARM_start_service (arm, "arm", | 125 | GNUNET_ARM_start_service (arm, "arm", |
112 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, START_TIMEOUT, | 126 | GNUNET_OS_INHERIT_STD_OUT_AND_ERR, START_TIMEOUT, |