aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_reliability.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_api_reliability.c')
-rw-r--r--src/transport/test_transport_api_reliability.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index c95729ab9..0b80477bf 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -393,8 +393,10 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
393#if VERBOSE 393#if VERBOSE
394 if (ntohl (hdr->num) % 5 == 0) 394 if (ntohl (hdr->num) % 5 == 0)
395 { 395 {
396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got message %u of size %u\n", 396 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
397 ntohl (hdr->num), ntohs (message->size)); 397 "Got message %u of size %u\n",
398 ntohl (hdr->num),
399 ntohs (message->size));
398 } 400 }
399#endif 401#endif
400 n++; 402 n++;
@@ -505,7 +507,8 @@ notify_ready (void *cls, size_t size, void *buf)
505static void 507static void
506notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer) 508notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
507{ 509{
508 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n", 510 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
511 "Peer `%4s' connected to us (%p)!\n",
509 GNUNET_i2s (peer), cls); 512 GNUNET_i2s (peer), cls);
510} 513}
511 514
@@ -513,7 +516,8 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
513static void 516static void
514notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer) 517notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
515{ 518{
516 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' disconnected (%p)!\n", 519 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
520 "Peer `%4s' disconnected (%p)!\n",
517 GNUNET_i2s (peer), cls); 521 GNUNET_i2s (peer), cls);
518 if (th != NULL) 522 if (th != NULL)
519 GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); 523 GNUNET_TRANSPORT_notify_transmit_ready_cancel (th);
@@ -522,7 +526,8 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
522 526
523 527
524static void 528static void
525sendtask () 529sendtask (void *cls,
530 const struct GNUNET_SCHEDULER_TaskContext *tc)
526{ 531{
527 start_time = GNUNET_TIME_absolute_get (); 532 start_time = GNUNET_TIME_absolute_get ();
528 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 533 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -533,13 +538,17 @@ sendtask ()
533 NULL); 538 NULL);
534} 539}
535 540
541
536static void 542static void
537testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls) 543testing_connect_cb (struct PeerContext *p1,
544 struct PeerContext *p2,
545 void *cls)
538{ 546{
539 char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id)); 547 char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
540 548
541 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 549 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
542 "Peers connected: %s <-> %s\n", p1_c, 550 "Peers connected: %s <-> %s\n",
551 p1_c,
543 GNUNET_i2s (&p2->id)); 552 GNUNET_i2s (&p2->id));
544 GNUNET_free (p1_c); 553 GNUNET_free (p1_c);
545 554