- correct port
[oweals/gnunet.git] / src / transport / test_transport_startonly.c
index 68fac8e957b03d2af0d8fbb5d4528ce6a28265de..79578ab53b65efb5b65ea2a8040c19e9db6014a2 100644 (file)
@@ -37,9 +37,9 @@
 #include "transport.h"
 #include "transport-testing.h"
 
-#define VERBOSE GNUNET_EXTRA_LOGGING
+#define VERBOSE GNUNET_NO
 
-#define VERBOSE_ARM GNUNET_EXTRA_LOGGING
+#define VERBOSE_ARM GNUNET_NO
 
 #define START_ARM GNUNET_YES
 
@@ -54,7 +54,7 @@ GNUNET_SCHEDULER_TaskIdentifier timeout_task;
 
 static struct PeerContext *p1;
 
-struct GNUNET_TRANSPORT_TESTING_handle * tth;
+struct GNUNET_TRANSPORT_TESTING_handle *tth;
 
 static int connected = GNUNET_NO;
 
@@ -92,8 +92,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 static void
 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
-                uint32_t ats_count)
+                const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%s' connected \n",
               GNUNET_i2s (peer));
@@ -110,8 +109,7 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_TRANSPORT_ATS_Information *ats,
-                uint32_t ats_count)
+                const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving\n");
 }
@@ -126,12 +124,14 @@ run (void *cls, char *const *args, const char *cfgfile,
   timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
 
   i = 1;
-  fprintf (stderr, "%i", i);
+  FPRINTF (stderr, "%i", i);
   while (i <= ITERATIONS)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n");
-    p1 = GNUNET_TRANSPORT_TESTING_start_peer (tth, "test_transport_startonly.conf", 1,
-                                              &notify_receive, &notify_connect,
+    p1 = GNUNET_TRANSPORT_TESTING_start_peer (tth,
+                                              "test_transport_startonly.conf",
+                                              1, &notify_receive,
+                                              &notify_connect,
                                               &notify_disconnect, NULL, p1);
 
 
@@ -147,12 +147,12 @@ run (void *cls, char *const *args, const char *cfgfile,
 
     i++;
     if (i <= ITERATIONS)
-      fprintf (stderr, "..%i", i);
+      FPRINTF (stderr, "..%i", i);
   }
 
-  GNUNET_TRANSPORT_TESTING_init (tth);
+  tth = GNUNET_TRANSPORT_TESTING_init ();
 
-  fprintf (stderr, "\n");
+  FPRINTF (stderr, "%s",  "\n");
   end ();
 }