stuff
authorChristian Grothoff <christian@grothoff.org>
Mon, 4 Jul 2011 09:02:34 +0000 (09:02 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 4 Jul 2011 09:02:34 +0000 (09:02 +0000)
src/topology/test_gnunet_daemon_topology.c
src/topology/test_gnunet_daemon_topology_data.conf

index 5c54e0ee31f60289b1b1f9001c46d706664dfcde..85f328fe52a8824353681707ab05304553ccbec5 100644 (file)
@@ -51,8 +51,9 @@ static struct GNUNET_TESTING_Daemon *last;
 /**
  * Check whether peers successfully shut down.
  */
-void shutdown_callback (void *cls,
-                        const char *emsg)
+static void 
+shutdown_callback (void *cls,
+                  const char *emsg)
 {
   if (emsg != NULL)
     {
@@ -72,6 +73,7 @@ void shutdown_callback (void *cls,
     }
 }
 
+
 static void
 clean_up_task (void *cls,
                 const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -112,11 +114,12 @@ notify_connect_complete(void *cls,
 }
 
 
-static void my_cb(void *cls,
-                  const struct GNUNET_PeerIdentity *id,
-                  const struct GNUNET_CONFIGURATION_Handle *cfg,
-                  struct GNUNET_TESTING_Daemon *d,
-                  const char *emsg)
+static 
+void my_cb(void *cls,
+          const struct GNUNET_PeerIdentity *id,
+          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          struct GNUNET_TESTING_Daemon *d,
+          const char *emsg)
 {
   GNUNET_assert (id != NULL);
   peers_left--;  
@@ -164,10 +167,12 @@ run (void *cls,
   GNUNET_assert (pg != NULL);
 }
 
+
 static int
 check ()
 {
-  char *const argv[] = { "test-testing",
+  char *const argv[] = { 
+    "test-gnunet-daemon-topology",
     "-c",
     "test_gnunet_daemon_topology_data.conf",
 #if VERBOSE
@@ -184,6 +189,7 @@ check ()
   return ok;
 }
 
+
 int
 main (int argc, char *argv[])
 {
@@ -197,7 +203,6 @@ main (int argc, char *argv[])
 #endif
                     NULL);
   ret = check ();
-  sleep (1); /* FIXME: needed? */
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-topology");
   return ret;
 }
index a2340570b82fdfc02096144dcd59dedda66f8e37..1575b25248e4db13d18b392c1d527196d91f37ba 100644 (file)
@@ -7,7 +7,7 @@ PORT = 2664
 [transport]
 PORT = 2665
 PLUGINS = tcp
-# DEBUG = YES
+#DEBUG = YES
 #PREFIX = xterm -e xterm -T transport -e gdb -x cmd --args
 #PREFIX = valgrind --tool=memcheck --log-file=logs%p
 
@@ -30,13 +30,14 @@ ALLOW_NAT = NO
 INTERNAL_ADDRESS = 127.0.0.1
 EXTERNAL_ADDRESS = 127.0.0.1
 USE_LOCALADDR = NO
+USE_HOSTNAME = NO
 
 [peerinfo]
 PORT = 2669
 
 [core]
 PORT = 2670
-# DEBUG = YES
+#DEBUG = YES
 
 [topology]
 # DEBUG = YES