diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-24 07:04:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-24 07:04:18 +0000 |
commit | fe384d97cdfcb47c10a05f56f983f24619115a19 (patch) | |
tree | f4503df3ea08b6e6f329acbbe760f38695e33919 /src/arm | |
parent | 3b11f5a4e6e45230994686d292376fac4734c51e (diff) | |
download | gnunet-fe384d97cdfcb47c10a05f56f983f24619115a19.tar.gz gnunet-fe384d97cdfcb47c10a05f56f983f24619115a19.zip |
move ARM/config logic to util/ where it doesn't need to cast away a 'const' and is _slightly_ less likely to be forgotten, also add big fat comment to hopefully clarify why it is there
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/test_arm_api.c | 15 | ||||
-rw-r--r-- | src/arm/test_exponential_backoff.c | 14 |
2 files changed, 0 insertions, 29 deletions
diff --git a/src/arm/test_arm_api.c b/src/arm/test_arm_api.c index 67bf45871..6bd5132ee 100644 --- a/src/arm/test_arm_api.c +++ b/src/arm/test_arm_api.c | |||
@@ -185,22 +185,7 @@ static void | |||
185 | task (void *cls, char *const *args, const char *cfgfile, | 185 | task (void *cls, char *const *args, const char *cfgfile, |
186 | const struct GNUNET_CONFIGURATION_Handle *c) | 186 | const struct GNUNET_CONFIGURATION_Handle *c) |
187 | { | 187 | { |
188 | char *armconfig; | ||
189 | cfg = c; | 188 | cfg = c; |
190 | if (NULL != cfgfile) | ||
191 | { | ||
192 | if (GNUNET_OK != | ||
193 | GNUNET_CONFIGURATION_get_value_filename (cfg, | ||
194 | "arm", "CONFIG", | ||
195 | &armconfig)) | ||
196 | { | ||
197 | GNUNET_CONFIGURATION_set_value_string ((struct GNUNET_CONFIGURATION_Handle | ||
198 | *) cfg, "arm", "CONFIG", | ||
199 | cfgfile); | ||
200 | } | ||
201 | else | ||
202 | GNUNET_free (armconfig); | ||
203 | } | ||
204 | arm = GNUNET_ARM_connect (cfg, &arm_conn, NULL); | 189 | arm = GNUNET_ARM_connect (cfg, &arm_conn, NULL); |
205 | if (NULL == arm) | 190 | if (NULL == arm) |
206 | return; | 191 | return; |
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index a14103be0..d0277523b 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -356,21 +356,7 @@ static void | |||
356 | task (void *cls, char *const *args, const char *cfgfile, | 356 | task (void *cls, char *const *args, const char *cfgfile, |
357 | const struct GNUNET_CONFIGURATION_Handle *c) | 357 | const struct GNUNET_CONFIGURATION_Handle *c) |
358 | { | 358 | { |
359 | char *armconfig; | ||
360 | cfg = c; | 359 | cfg = c; |
361 | if (NULL != cfgfile) | ||
362 | { | ||
363 | if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "arm", | ||
364 | "CONFIG", &armconfig)) | ||
365 | { | ||
366 | GNUNET_CONFIGURATION_set_value_string ((struct GNUNET_CONFIGURATION_Handle | ||
367 | *) cfg, "arm", "CONFIG", | ||
368 | cfgfile); | ||
369 | } | ||
370 | else | ||
371 | GNUNET_free (armconfig); | ||
372 | } | ||
373 | |||
374 | arm = GNUNET_ARM_connect (cfg, NULL, NULL); | 360 | arm = GNUNET_ARM_connect (cfg, NULL, NULL); |
375 | if (NULL != arm) | 361 | if (NULL != arm) |
376 | { | 362 | { |