fix
[oweals/gnunet.git] / src / core / test_core_api_reliability.c
index 7a7d6db92f1ebdec8c626311889f581e776c22fa..f981f105a0adde8a4bd64db6103b68fe4bc63fc6 100644 (file)
 
 #define START_ARM GNUNET_YES
 
+/**
+ * Note that this value must not significantly exceed
+ * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
+ * messages may be dropped even for a reliable transport.
+ */
+#define TOTAL_MSGS (600 * 10)
+
 /**
  * How long until we give up on transmitting the message?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 6000)
 
 /**
  * What delay do we request from the core service for transmission?
@@ -58,13 +65,6 @@ static unsigned long long total_bytes;
 
 static struct GNUNET_TIME_Absolute start_time;
 
-/**
- * Note that this value must not significantly exceed
- * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise
- * messages may be dropped even for a reliable transport.
- */
-#define TOTAL_MSGS (600 * 2)
-
 struct PeerContext
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -375,6 +375,7 @@ init_notify (void *cls,
                            &init_notify,                        
                            &connect_notify,
                            &disconnect_notify,
+                          NULL,
                            &inbound_notify,
                            GNUNET_YES,
                            &outbound_notify, GNUNET_YES, handlers);
@@ -398,7 +399,7 @@ init_notify (void *cls,
                                                       0,
                                                       TIMEOUT,
                                                       &p2.id,
-                                                      sizeof (struct GNUNET_MessageHeader),
+                                                      get_size (0),
                                                       &transmit_ready, &p1));
     }
 }
@@ -443,7 +444,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
                                         "-c", cfgname, NULL);
 #endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
-  p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, p, NULL, NULL, NULL);
+  p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, NULL, p, NULL, NULL, NULL);
   GNUNET_assert (p->th != NULL);
   GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
 }
@@ -468,6 +469,7 @@ run (void *cls,
                        &init_notify,
                       &connect_notify,
                        &disconnect_notify,
+                      NULL,
                        &inbound_notify,
                        GNUNET_YES, &outbound_notify, GNUNET_YES, handlers);
 }