diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-07-31 06:58:55 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-07-31 06:58:55 +0000 |
commit | c14ff64b5c9ca4cfc5004e30622499cc782694c5 (patch) | |
tree | 85f5f098c4054fccffcf56159e3543cf1d252c48 /src/cadet/gnunet-cadet.c | |
parent | 5eb722ace41a4cccf9d65bf408cfd3c45756cf2f (diff) | |
download | gnunet-c14ff64b5c9ca4cfc5004e30622499cc782694c5.tar.gz gnunet-c14ff64b5c9ca4cfc5004e30622499cc782694c5.zip |
- refactor GCP_get_peer, fix get peer info
Diffstat (limited to 'src/cadet/gnunet-cadet.c')
-rw-r--r-- | src/cadet/gnunet-cadet.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 7e6bf3fce..f0537adc6 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -515,15 +515,17 @@ peer_callback (void *cls, | |||
515 | GNUNET_i2s_full (peer), | 515 | GNUNET_i2s_full (peer), |
516 | tunnel ? "Y" : "N", neighbor ? "Y" : "N", n_paths); | 516 | tunnel ? "Y" : "N", neighbor ? "Y" : "N", n_paths); |
517 | p = paths; | 517 | p = paths; |
518 | for (i = 0; i < n_paths && NULL != p; i++) | 518 | for (i = 0; i < n_paths && NULL != p;) |
519 | { | 519 | { |
520 | FPRINTF (stdout, "%s ", GNUNET_i2s_full (p)); | 520 | FPRINTF (stdout, "%s ", GNUNET_i2s (p)); |
521 | if (0 == memcmp (p, peer, sizeof (*p))) | 521 | if (0 == memcmp (p, peer, sizeof (*p))) |
522 | { | 522 | { |
523 | FPRINTF (stdout, "\n"); | 523 | FPRINTF (stdout, "\n"); |
524 | i++; | ||
524 | } | 525 | } |
525 | p++; | 526 | p++; |
526 | } | 527 | } |
528 | |||
527 | GNUNET_SCHEDULER_shutdown(); | 529 | GNUNET_SCHEDULER_shutdown(); |
528 | } | 530 | } |
529 | 531 | ||