-no NSE
[oweals/gnunet.git] / src / hostlist / test_gnunet_daemon_hostlist_reconnect.c
index 8e309cdb0c19b70062bc48c4d4c97841acccc3ba..1962bcd45735ca3a51c12fb5ebdde688c9e5535e 100644 (file)
@@ -135,9 +135,11 @@ setup_peer (struct PeerContext *p, const char *cfgname)
   binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
   p->cfg = GNUNET_CONFIGURATION_create ();
   p->arm_proc =
-    GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary,
-                               "gnunet-service-arm",
-                               "-c", cfgname, NULL);
+    GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+                             NULL, NULL, NULL,
+                             binary,
+                             "gnunet-service-arm",
+                             "-c", cfgname, NULL);
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
   p->th =
       GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL);
@@ -153,7 +155,7 @@ waitpid_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct PeerContext *p = cls;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Killing ARM process.\n");
-  if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM))
+  if (0 != GNUNET_OS_process_kill (p->arm_proc, GNUNET_TERM_SIG))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
   if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK)
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid");
@@ -201,7 +203,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 int
 main (int argcx, char *argvx[])
 {
-  static char *const argv[] = { 
+  static char *const argv[] = {
     "test-gnunet-daemon-hostlist",
     "-c", "test_gnunet_daemon_hostlist_data.conf",
     NULL
@@ -224,6 +226,7 @@ main (int argcx, char *argvx[])
   {
     FPRINTF (stderr, "%s",  ".");
     /* now do it again */
+    ok = 1;
     GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
                        "test-gnunet-daemon-hostlist", "nohelp", options, &run,
                        &ok);