Check that you are not present in trail twice
[oweals/gnunet.git] / src / transport / test_transport_api_restart_2peers.c
index 1d7790c9fb84c01eccfa1c59646d59d0a7ecb4dc..3b5d63bce48e7eb4efcfbd45d8c43cd4e6400da8 100644 (file)
  * C code apparently.
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
 #include "gnunet_transport_service.h"
-#include "transport.h"
 #include "transport-testing.h"
 
-#define START_ARM GNUNET_YES
-
 /**
  * How long until we give up on transmitting the message?
  */
@@ -147,7 +138,7 @@ reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   struct PeerContext *p = cls;
 
   reconnect_task = GNUNET_SCHEDULER_NO_TASK;
-  GNUNET_TRANSPORT_try_connect (p1->th, &p2->id);
+  GNUNET_TRANSPORT_try_connect (p1->th, &p2->id, NULL, NULL); /*FIXME TRY_CONNECT change */
   reconnect_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect, p);
 }
@@ -180,8 +171,7 @@ restart (struct PeerContext *p, char *cfg_file)
 
 static void
 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+                const struct GNUNET_MessageHeader *message)
 {
   struct PeerContext *p = cls;
   struct PeerContext *t = NULL;
@@ -280,15 +270,14 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
               p2->no, GNUNET_i2s (&p2->id), p1->no, receiver_s);
   GNUNET_free (receiver_s);
 
-  th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256, 0,
+  th = GNUNET_TRANSPORT_notify_transmit_ready (p2->th, &p1->id, 256,
                                                TIMEOUT_TRANSMIT, &notify_ready,
                                                p1);
 }
 
 
 static void
-notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
+notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   static int c;
 
@@ -417,9 +406,6 @@ check ()
     GNUNET_GETOPT_OPTION_END
   };
 
-#if WRITECONFIG
-  setTransportOptions ("test_transport_api_data.conf");
-#endif
   send_task = GNUNET_SCHEDULER_NO_TASK;
 
   ok = 1;