- simplify parameters
[oweals/gnunet.git] / src / hostlist / test_gnunet_daemon_hostlist_learning.c
index 6f0ab4c9e29261488c0405f16ba3c8b329a705a2..66e9b5c4924c303945c098e423cbcaca1dd26e9e 100644 (file)
@@ -313,9 +313,7 @@ check_statistics (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  */
 static int
 ad_arrive_handler (void *cls, const struct GNUNET_PeerIdentity *peer,
-                   const struct GNUNET_MessageHeader *message,
-                   const struct GNUNET_ATS_Information *atsi,
-                   unsigned int atsi_count)
+                   const struct GNUNET_MessageHeader *message)
 {
   char *hostname;
   char *expected_uri;
@@ -382,10 +380,12 @@ setup_learn_peer (struct PeerContext *p, const char *cfgname)
 {
   char *filename;
   unsigned int result;
+  char *binary;
 
+  binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
   p->arm_proc =
-    GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
+    GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
@@ -408,20 +408,25 @@ setup_learn_peer (struct PeerContext *p, const char *cfgname)
   GNUNET_assert (NULL != p->core);
   p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg);
   GNUNET_assert (NULL != p->stats);
+  GNUNET_free (binary);
 }
 
 
 static void
 setup_adv_peer (struct PeerContext *p, const char *cfgname)
 {
+  char *binary;
+
+  binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
   p->arm_proc =
-    GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
+    GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary,
                                "gnunet-service-arm",
                                "-c", cfgname, NULL);
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   p->stats = GNUNET_STATISTICS_create ("hostlist", p->cfg);
   GNUNET_assert (NULL != p->stats);
+  GNUNET_free (binary);
 }