diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_plugins.c')
-rw-r--r-- | src/transport/gnunet-service-transport_plugins.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c index 9f6961919..e3dd3b26b 100644 --- a/src/transport/gnunet-service-transport_plugins.c +++ b/src/transport/gnunet-service-transport_plugins.c | |||
@@ -203,12 +203,19 @@ const char * | |||
203 | GST_plugins_a2s (const struct GNUNET_HELLO_Address *address) | 203 | GST_plugins_a2s (const struct GNUNET_HELLO_Address *address) |
204 | { | 204 | { |
205 | struct GNUNET_TRANSPORT_PluginFunctions *api; | 205 | struct GNUNET_TRANSPORT_PluginFunctions *api; |
206 | static char unable_to_show[1024]; | ||
206 | 207 | ||
207 | if (address == NULL) | 208 | if (address == NULL) |
208 | return "<inbound>"; | 209 | return "<inbound>"; |
209 | api = GST_plugins_find (address->transport_name); | 210 | api = GST_plugins_find (address->transport_name); |
210 | if ((api == NULL) || (address->address_length == 0) || (address->address == NULL)) | 211 | if ((api == NULL) || (address->address_length == 0) || (address->address == NULL)) |
211 | return NULL; | 212 | { |
213 | snprintf (unable_to_show, 1024, | ||
214 | "<unable to stringify %u-byte long address 0x%x used by %s transport>", | ||
215 | address->address_length, address, address->transport_name); | ||
216 | unable_to_show[1023] = '\0'; | ||
217 | return unable_to_show; | ||
218 | } | ||
212 | return api->address_to_string (NULL, address->address, address->address_length); | 219 | return api->address_to_string (NULL, address->address, address->address_length); |
213 | } | 220 | } |
214 | 221 | ||