aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_manipulation_recv_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_api_manipulation_recv_tcp.c')
-rw-r--r--src/transport/test_transport_api_manipulation_recv_tcp.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/transport/test_transport_api_manipulation_recv_tcp.c b/src/transport/test_transport_api_manipulation_recv_tcp.c
index 83d1431dc..a91866be4 100644
--- a/src/transport/test_transport_api_manipulation_recv_tcp.c
+++ b/src/transport/test_transport_api_manipulation_recv_tcp.c
@@ -200,13 +200,14 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
200 /* Received non-delayed message */ 200 /* Received non-delayed message */
201 dur_normal = GNUNET_TIME_absolute_get_duration(start_normal); 201 dur_normal = GNUNET_TIME_absolute_get_duration(start_normal);
202 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 202 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
203 "Received non-delayed message %u after %llu\n", 203 "Received non-delayed message %u after %s\n",
204 messages_recv, 204 messages_recv,
205 (long long unsigned int) dur_normal.rel_value); 205 GNUNET_STRINGS_relative_time_to_string (dur_normal,
206 GNUNET_YES));
206 207
207 struct GNUNET_ATS_Information ats[2]; 208 struct GNUNET_ATS_Information ats[2];
208 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); 209 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
209 ats[0].value = htonl (1000); 210 ats[0].value = htonl (1000 * 1000LL);
210 ats[1].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 211 ats[1].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
211 ats[1].value = htonl (10); 212 ats[1].value = htonl (10);
212 213
@@ -218,16 +219,18 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
218 /* Received manipulated message */ 219 /* Received manipulated message */
219 dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed); 220 dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed);
220 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 221 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
221 "Received delayed message %u after %llu\n", 222 "Received delayed message %u after %s\n",
222 messages_recv, 223 messages_recv,
223 (long long unsigned int) dur_delayed.rel_value); 224 GNUNET_STRINGS_relative_time_to_string (dur_delayed,
224 if (dur_delayed.rel_value < 1000) 225 GNUNET_YES));
226 if (dur_delayed.rel_value_us < 1000 * 1000LL)
225 { 227 {
226 GNUNET_break (0); 228 GNUNET_break (0);
227 ok += 1; 229 ok += 1;
228 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 230 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
229 "Delayed message was not delayed correctly: took only %llu\n", 231 "Delayed message was not delayed correctly: took only %s\n",
230 (long long unsigned int) dur_delayed.rel_value); 232 GNUNET_STRINGS_relative_time_to_string (dur_delayed,
233 GNUNET_YES));
231 } 234 }
232 /* shutdown */ 235 /* shutdown */
233 end (); 236 end ();