(no commit message)
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 12 Aug 2011 23:11:07 +0000 (23:11 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 12 Aug 2011 23:11:07 +0000 (23:11 +0000)
src/transport/test_transport_api_reliability.c

index 273a69526050aa13cf76e7dfc6ae037760428991..37395ad0f03045bbf93b74218749f706f249332c 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 (1024 * 2)
-
 /**
  * How long until we give up on transmitting the message?
  */
 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1500)
 
-#define MTYPE 12345
-
 static int ok;
 
 static  GNUNET_SCHEDULER_TaskIdentifier die_task;
@@ -76,6 +67,15 @@ char * cfg_file_p2;
  * Testcase specific declarations
  */
 
+/**
+ * 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 (1024 * 2)
+
+#define MTYPE 12345
+
 struct TestMessage
 {
   struct GNUNET_MessageHeader header;
@@ -309,6 +309,10 @@ notify_ready (void *cls, size_t size, void *buf)
                   ret);
     }
   total_bytes += ret;
+  if (n == TOTAL_MSGS)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"All messages sent\n");
+  }
   return ret;
 }