aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-09-04 09:58:15 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-09-04 09:58:15 +0000
commitcf17dc692dbedbb72083b1a0d031144f1e7f1626 (patch)
tree6691bb3abb1ddbffb91c6be7dbfbe08263a220cd /src/transport/test_plugin_transport.c
parent8beaae6391d6642bcbbc9723324c46393b7821d2 (diff)
downloadgnunet-cf17dc692dbedbb72083b1a0d031144f1e7f1626.tar.gz
gnunet-cf17dc692dbedbb72083b1a0d031144f1e7f1626.zip
- fix
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r--src/transport/test_plugin_transport.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index dae1130df..5ebe4759f 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -287,6 +287,28 @@ env_receive (void *cls,
287 return GNUNET_TIME_relative_get_zero_(); 287 return GNUNET_TIME_relative_get_zero_();
288} 288}
289 289
290/**
291 * Take the given address and append it to the set of results sent back to
292 * the client.
293 *
294 * @param cls the transmission context used ('struct GNUNET_SERVER_TransmitContext*')
295 * @param buf text to transmit
296 */
297static void
298address_pretty_printer_cb (void *cls, const char *buf)
299{
300 if (NULL != buf)
301 {
302 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
303 "Pretty address : `%s'\n", buf);
304 }
305 else
306 {
307 GNUNET_break (0);
308 end_badly_now ();
309 }
310}
311
290 312
291static void 313static void
292env_notify_address (void *cls, 314env_notify_address (void *cls,
@@ -312,6 +334,11 @@ env_notify_address (void *cls,
312 memcpy (w->addr, addr, addrlen); 334 memcpy (w->addr, addr, addrlen);
313 GNUNET_CONTAINER_DLL_insert(head, tail, w); 335 GNUNET_CONTAINER_DLL_insert(head, tail, w);
314 336
337 api->address_pretty_printer (api->cls, plugin, addr, addrlen,
338 GNUNET_YES, GNUNET_TIME_UNIT_MINUTES,
339 &address_pretty_printer_cb,
340 w);
341
315 a2s = strdup (api->address_to_string (api, w->addr, w->addrlen)); 342 a2s = strdup (api->address_to_string (api, w->addr, w->addrlen));
316 if (NULL == a2s) 343 if (NULL == a2s)
317 { 344 {