From 805842808d78b7c94d9b14139e79616c6249cab8 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 19 May 2014 14:35:19 +0000 Subject: improved output for gnunet-transport --- src/transport/gnunet-transport.c | 13 +++++++++++-- src/transport/transport_api_address_to_string.c | 2 -- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index d4e16face..6ff731431 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c @@ -1081,7 +1081,16 @@ process_peer_string (void *cls, const char *address, int res) if (address != NULL ) { - print_info (&rc->id, rc->transport, address, rc->state, rc->state_timeout); + if (GNUNET_SYSERR == res) + { + FPRINTF (stderr, "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n", + GNUNET_i2s (&rc->id), + rc->addrcp->transport_name, + rc->addrcp->address_length); + print_info (&rc->id, rc->transport, NULL, rc->state, rc->state_timeout); + } + else + print_info (&rc->id, rc->transport, address, rc->state, rc->state_timeout); rc->printed = GNUNET_YES; } else @@ -1099,7 +1108,7 @@ process_peer_string (void *cls, const char *address, int res) } else { - print_info (&rc->id, rc->transport, "", + print_info (&rc->id, rc->transport, NULL, rc->state, rc->state_timeout); } } diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c index 8a0db240f..f383a44b4 100644 --- a/src/transport/transport_api_address_to_string.c +++ b/src/transport/transport_api_address_to_string.c @@ -125,8 +125,6 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) return; } - result = GNUNET_NO; - /* expect more replies */ GNUNET_CLIENT_receive (alucb->client, &address_response_processor, alucb, GNUNET_TIME_absolute_get_remaining (alucb->timeout)); -- cgit v1.2.3