diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-08-12 23:11:07 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-08-12 23:11:07 +0000 |
commit | 1af0bbf7eed53db863d413a1862ac1ded3f29ffc (patch) | |
tree | dfedf8b16e0583a75ef6da0698878e059926d609 /src | |
parent | 6a84e71e9d695c5250a51999f48416600d92840f (diff) | |
download | gnunet-1af0bbf7eed53db863d413a1862ac1ded3f29ffc.tar.gz gnunet-1af0bbf7eed53db863d413a1862ac1ded3f29ffc.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/test_transport_api_reliability.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 273a69526..37395ad0f 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -45,19 +45,10 @@ | |||
45 | #define START_ARM GNUNET_YES | 45 | #define START_ARM GNUNET_YES |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Note that this value must not significantly exceed | ||
49 | * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise | ||
50 | * messages may be dropped even for a reliable transport. | ||
51 | */ | ||
52 | #define TOTAL_MSGS (1024 * 2) | ||
53 | |||
54 | /** | ||
55 | * How long until we give up on transmitting the message? | 48 | * How long until we give up on transmitting the message? |
56 | */ | 49 | */ |
57 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1500) | 50 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1500) |
58 | 51 | ||
59 | #define MTYPE 12345 | ||
60 | |||
61 | static int ok; | 52 | static int ok; |
62 | 53 | ||
63 | static GNUNET_SCHEDULER_TaskIdentifier die_task; | 54 | static GNUNET_SCHEDULER_TaskIdentifier die_task; |
@@ -76,6 +67,15 @@ char * cfg_file_p2; | |||
76 | * Testcase specific declarations | 67 | * Testcase specific declarations |
77 | */ | 68 | */ |
78 | 69 | ||
70 | /** | ||
71 | * Note that this value must not significantly exceed | ||
72 | * 'MAX_PENDING' in 'gnunet-service-transport.c', otherwise | ||
73 | * messages may be dropped even for a reliable transport. | ||
74 | */ | ||
75 | #define TOTAL_MSGS (1024 * 2) | ||
76 | |||
77 | #define MTYPE 12345 | ||
78 | |||
79 | struct TestMessage | 79 | struct TestMessage |
80 | { | 80 | { |
81 | struct GNUNET_MessageHeader header; | 81 | struct GNUNET_MessageHeader header; |
@@ -309,6 +309,10 @@ notify_ready (void *cls, size_t size, void *buf) | |||
309 | ret); | 309 | ret); |
310 | } | 310 | } |
311 | total_bytes += ret; | 311 | total_bytes += ret; |
312 | if (n == TOTAL_MSGS) | ||
313 | { | ||
314 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"All messages sent\n"); | ||
315 | } | ||
312 | return ret; | 316 | return ret; |
313 | } | 317 | } |
314 | 318 | ||