diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_plugins.c')
-rw-r--r-- | src/transport/gnunet-service-transport_plugins.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c index e3dd3b26b..f14eb57d6 100644 --- a/src/transport/gnunet-service-transport_plugins.c +++ b/src/transport/gnunet-service-transport_plugins.c | |||
@@ -208,12 +208,15 @@ GST_plugins_a2s (const struct GNUNET_HELLO_Address *address) | |||
208 | if (address == NULL) | 208 | if (address == NULL) |
209 | return "<inbound>"; | 209 | return "<inbound>"; |
210 | api = GST_plugins_find (address->transport_name); | 210 | api = GST_plugins_find (address->transport_name); |
211 | if ((api == NULL) || (address->address_length == 0) || (address->address == NULL)) | 211 | if (NULL == api) |
212 | return "<plugin unknown>"; | ||
213 | if (0 == address->address_length) | ||
212 | { | 214 | { |
213 | snprintf (unable_to_show, 1024, | 215 | GNUNET_snprintf (unable_to_show, |
214 | "<unable to stringify %u-byte long address 0x%x used by %s transport>", | 216 | sizeof (unable_to_show), |
215 | address->address_length, address, address->transport_name); | 217 | "<unable to stringify %u-byte long address of %s transport>", |
216 | unable_to_show[1023] = '\0'; | 218 | (unsigned int) address->address_length, |
219 | address->transport_name); | ||
217 | return unable_to_show; | 220 | return unable_to_show; |
218 | } | 221 | } |
219 | return api->address_to_string (NULL, address->address, address->address_length); | 222 | return api->address_to_string (NULL, address->address, address->address_length); |