aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_manipulation_send_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_api_manipulation_send_tcp.c')
-rw-r--r--src/transport/test_transport_api_manipulation_send_tcp.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c
index 5361e0aba..2b7fdc250 100644
--- a/src/transport/test_transport_api_manipulation_send_tcp.c
+++ b/src/transport/test_transport_api_manipulation_send_tcp.c
@@ -200,9 +200,10 @@ 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 send_task = GNUNET_SCHEDULER_add_now (&sendtask, NULL); 207 send_task = GNUNET_SCHEDULER_add_now (&sendtask, NULL);
207 } 208 }
208 if (1 == messages_recv) 209 if (1 == messages_recv)
@@ -210,16 +211,18 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
210 /* Received manipulated message */ 211 /* Received manipulated message */
211 dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed); 212 dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed);
212 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
213 "Received delayed message %u after %llu\n", 214 "Received delayed message %u after %s\n",
214 messages_recv, 215 messages_recv,
215 (long long unsigned int) dur_delayed.rel_value); 216 GNUNET_STRINGS_relative_time_to_string (dur_delayed,
216 if (dur_delayed.rel_value < 1000) 217 GNUNET_YES));
218 if (dur_delayed.rel_value_us < 1000 * 1000LL)
217 { 219 {
218 GNUNET_break (0); 220 GNUNET_break (0);
219 ok += 1; 221 ok += 1;
220 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 222 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
221 "Delayed message was not delayed correctly: took only %llu\n", 223 "Delayed message was not delayed correctly: took only %s\n",
222 (long long unsigned int) dur_delayed.rel_value); 224 GNUNET_STRINGS_relative_time_to_string (dur_delayed,
225 GNUNET_YES));
223 } 226 }
224 227
225 /* shutdown */ 228 /* shutdown */
@@ -291,7 +294,7 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
291 if (1 == messages_recv) 294 if (1 == messages_recv)
292 { 295 {
293 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); 296 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
294 ats[0].value = htonl (1000); 297 ats[0].value = htonl (1000LL * 1000LL);
295 GNUNET_TRANSPORT_set_traffic_metric (p2->th, &p1->id, GNUNET_NO, GNUNET_YES, ats, 1); 298 GNUNET_TRANSPORT_set_traffic_metric (p2->th, &p1->id, GNUNET_NO, GNUNET_YES, ats, 1);
296 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 299 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
297 ats[0].value = htonl (10); 300 ats[0].value = htonl (10);