diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-19 14:13:50 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-19 14:13:50 +0000 |
commit | c7a70aa21e0f0a0325f8b2c743713d6fb1f2fc0a (patch) | |
tree | 92e585084faca5c0a9b0523874e4b7d839a4b6f3 /src/transport/gnunet-transport.c | |
parent | 819dd2547e8d11d094fe83a39667559e54e181c6 (diff) | |
download | gnunet-c7a70aa21e0f0a0325f8b2c743713d6fb1f2fc0a.tar.gz gnunet-c7a70aa21e0f0a0325f8b2c743713d6fb1f2fc0a.zip |
new api
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r-- | src/transport/gnunet-transport.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 4487fc0e7..d4e16face 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -579,7 +579,7 @@ resolve_validation_address (const struct GNUNET_PeerIdentity *id, | |||
579 | 579 | ||
580 | 580 | ||
581 | static void | 581 | static void |
582 | process_validation_string (void *cls, const char *address) | 582 | process_validation_string (void *cls, const char *address, int res) |
583 | { | 583 | { |
584 | struct ValidationResolutionContext *vc = cls; | 584 | struct ValidationResolutionContext *vc = cls; |
585 | char *s_valid; | 585 | char *s_valid; |
@@ -588,6 +588,13 @@ process_validation_string (void *cls, const char *address) | |||
588 | 588 | ||
589 | if (address != NULL ) | 589 | if (address != NULL ) |
590 | { | 590 | { |
591 | if (GNUNET_SYSERR == res) | ||
592 | { | ||
593 | FPRINTF (stderr, "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n", | ||
594 | GNUNET_i2s (&vc->id), | ||
595 | vc->addrcp->transport_name, | ||
596 | vc->addrcp->address_length); | ||
597 | } | ||
591 | if (GNUNET_TIME_UNIT_ZERO_ABS.abs_value_us == vc->valid_until.abs_value_us) | 598 | if (GNUNET_TIME_UNIT_ZERO_ABS.abs_value_us == vc->valid_until.abs_value_us) |
592 | s_valid = GNUNET_strdup("never"); | 599 | s_valid = GNUNET_strdup("never"); |
593 | else | 600 | else |
@@ -605,7 +612,8 @@ process_validation_string (void *cls, const char *address) | |||
605 | 612 | ||
606 | FPRINTF (stdout, | 613 | FPRINTF (stdout, |
607 | _("Peer `%s' %s %s\n\t%s%s\n\t%s%s\n\t%s%s\n"), | 614 | _("Peer `%s' %s %s\n\t%s%s\n\t%s%s\n\t%s%s\n"), |
608 | GNUNET_i2s (&vc->id), address, | 615 | GNUNET_i2s (&vc->id), |
616 | (GNUNET_OK == res) ? address : "<invalid address>", | ||
609 | (monitor_validation) ? GNUNET_TRANSPORT_vs2s (vc->state) : "", | 617 | (monitor_validation) ? GNUNET_TRANSPORT_vs2s (vc->state) : "", |
610 | "Valid until : ", s_valid, | 618 | "Valid until : ", s_valid, |
611 | "Last validation: ",s_last, | 619 | "Last validation: ",s_last, |
@@ -618,9 +626,10 @@ process_validation_string (void *cls, const char *address) | |||
618 | else | 626 | else |
619 | { | 627 | { |
620 | /* done */ | 628 | /* done */ |
629 | |||
621 | GNUNET_assert(address_resolutions > 0); | 630 | GNUNET_assert(address_resolutions > 0); |
622 | address_resolutions--; | 631 | address_resolutions--; |
623 | if (GNUNET_NO == vc->printed) | 632 | if ((GNUNET_SYSERR == res) && (GNUNET_NO == vc->printed)) |
624 | { | 633 | { |
625 | if (numeric == GNUNET_NO) | 634 | if (numeric == GNUNET_NO) |
626 | { | 635 | { |
@@ -1066,7 +1075,7 @@ print_info (const struct GNUNET_PeerIdentity *id, | |||
1066 | 1075 | ||
1067 | 1076 | ||
1068 | static void | 1077 | static void |
1069 | process_peer_string (void *cls, const char *address) | 1078 | process_peer_string (void *cls, const char *address, int res) |
1070 | { | 1079 | { |
1071 | struct PeerResolutionContext *rc = cls; | 1080 | struct PeerResolutionContext *rc = cls; |
1072 | 1081 | ||