- fix 2699
[oweals/gnunet.git] / src / arm / test_arm_api.c
index e9bda410b0c33faa4bccddad8541f90c58f2f690..608c75cd34fc4d44ba12b7c78ada2c662352861b 100644 (file)
@@ -118,7 +118,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
   GNUNET_ARM_start_service (arm, "arm", GNUNET_OS_INHERIT_STD_OUT_AND_ERR, START_TIMEOUT, &arm_notify, NULL);