fix
[oweals/gnunet.git] / src / core / test_core_api_start_only.c
index 8994b31a7364512a5bba492373f04f122c844ab9..b55d3c972771820a22045c90356b8809b7c2bfb5 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -39,7 +39,7 @@
 /**
  * How long until we give up on transmitting the message?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
 
 #define MTYPE 12345
 
@@ -130,10 +130,10 @@ init_notify (void *cls,
                            p2.cfg,
                            TIMEOUT,
                            &p2,
-                           &init_notify,
-                          NULL,
+                           &init_notify,                        
                            &connect_notify,
                            &disconnect_notify,
+                          NULL,
                            &inbound_notify,
                            GNUNET_YES,
                            &outbound_notify, GNUNET_YES, handlers);
@@ -143,9 +143,6 @@ init_notify (void *cls,
       GNUNET_assert (cls == &p2);
       GNUNET_CORE_disconnect (p1.ch);
       GNUNET_CORE_disconnect (p2.ch);
-      GNUNET_ARM_stop_services (p1.cfg, sched, "core", NULL);
-      GNUNET_ARM_stop_services (p2.cfg, sched, "core", NULL);
-
       ok = 0;
     }
 }
@@ -156,7 +153,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
 {
   p->cfg = GNUNET_CONFIGURATION_create ();
 #if START_ARM
-  p->arm_pid = GNUNET_OS_start_process ("gnunet-service-arm",
+  p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
                                         "gnunet-service-arm",
 #if VERBOSE
                                         "-L", "DEBUG",
@@ -164,7 +161,6 @@ setup_peer (struct PeerContext *p, const char *cfgname)
                                         "-c", cfgname, NULL);
 #endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
-  GNUNET_ARM_start_services (p->cfg, sched, "core", NULL);
 }
 
 
@@ -185,9 +181,9 @@ run (void *cls,
                        TIMEOUT,
                        &p1,
                        &init_notify,
-                      NULL,
-                       &connect_notify,
+                      &connect_notify,
                        &disconnect_notify,
+                      NULL,
                        &inbound_notify,
                        GNUNET_YES, &outbound_notify, GNUNET_YES, handlers);
 }
@@ -211,7 +207,7 @@ stop_arm (struct PeerContext *p)
 static int
 check ()
 {
-  char *const argv[] = { "test-core-api",
+  char *const argv[] = { "test-core-api-start-only",
     "-c",
     "test_core_api_data.conf",
 #if VERBOSE
@@ -225,7 +221,7 @@ check ()
 
   ok = 1;
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
-                      argv, "test-core-api", "nohelp", options, &run, &ok);
+                      argv, "test-core-api-start-only", "nohelp", options, &run, &ok);
   stop_arm (&p1);
   stop_arm (&p2);
   return ok;
@@ -236,7 +232,7 @@ main (int argc, char *argv[])
 {
   int ret;
 
-  GNUNET_log_setup ("test-core-api",
+  GNUNET_log_setup ("test-core-api-start-only",
 #if VERBOSE
                     "DEBUG",
 #else