aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-cadet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-cadet.c')
-rw-r--r--src/cadet/gnunet-cadet.c52
1 files changed, 33 insertions, 19 deletions
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c
index ed297196e..67cebf02b 100644
--- a/src/cadet/gnunet-cadet.c
+++ b/src/cadet/gnunet-cadet.c
@@ -530,34 +530,48 @@ peer_callback (void *cls,
530 int tunnel, 530 int tunnel,
531 int neighbor, 531 int neighbor,
532 unsigned int n_paths, 532 unsigned int n_paths,
533 const struct GNUNET_PeerIdentity *paths) 533 const struct GNUNET_PeerIdentity *paths,
534 int offset,
535 int finished_with_paths)
534{ 536{
535 unsigned int i; 537 unsigned int i;
536 const struct GNUNET_PeerIdentity *p; 538 const struct GNUNET_PeerIdentity *p;
537 539
538 FPRINTF (stdout, 540
539 "%s [TUNNEL: %s, NEIGHBOR: %s, PATHS: %u]\n", 541 if (GNUNET_YES == finished_with_paths)
540 GNUNET_i2s_full (peer),
541 tunnel ? "Y" : "N",
542 neighbor ? "Y" : "N",
543 n_paths);
544 p = paths;
545 for (i = 0; i < n_paths && NULL != p;)
546 { 542 {
543 GNUNET_SCHEDULER_shutdown();
544 return;
545 }
546
547 if (offset == 0){
548 FPRINTF (stdout,
549 "%s [TUNNEL: %s, NEIGHBOR: %s, PATHS: %u]\n",
550 GNUNET_i2s_full (peer),
551 tunnel ? "Y" : "N",
552 neighbor ? "Y" : "N",
553 n_paths);
554 }else{
555 p = paths;
547 FPRINTF (stdout, 556 FPRINTF (stdout,
548 "%s ", 557 "Path with offset %u: ",
549 GNUNET_i2s (p)); 558 offset);
550 if (0 == memcmp (p, 559 for (i = 0; i < offset && NULL != p;)
551 peer,
552 sizeof (*p)))
553 { 560 {
554 FPRINTF (stdout, "\n"); 561 FPRINTF (stdout,
555 i++; 562 "%s ",
563 GNUNET_i2s (p));
564 i++;
565 p++;
556 } 566 }
557 p++; 567
568 FPRINTF (stdout,
569 "\n");
570
558 } 571 }
572
559 573
560 GNUNET_SCHEDULER_shutdown(); 574
561} 575}
562 576
563 577