From c09edda8e8071c6e5ca6b76e7c75a7b8402010ed Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 5 Sep 2012 09:10:42 +0000 Subject: - fix for 2nd cb --- src/transport/test_plugin_transport.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/transport/test_plugin_transport.c') diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index 5ebe4759f..e6a016c51 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c @@ -287,6 +287,9 @@ env_receive (void *cls, return GNUNET_TIME_relative_get_zero_(); } + +static int got_reply; + /** * Take the given address and append it to the set of results sent back to * the client. @@ -299,13 +302,17 @@ address_pretty_printer_cb (void *cls, const char *buf) { if (NULL != buf) { + got_reply = GNUNET_YES; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Pretty address : `%s'\n", buf); } else { - GNUNET_break (0); - end_badly_now (); + if (GNUNET_NO == got_reply) + { + GNUNET_break (0); + end_badly_now (); + } } } @@ -333,7 +340,7 @@ env_notify_address (void *cls, w->addrlen = addrlen; memcpy (w->addr, addr, addrlen); GNUNET_CONTAINER_DLL_insert(head, tail, w); - + got_reply = GNUNET_NO; api->address_pretty_printer (api->cls, plugin, addr, addrlen, GNUNET_YES, GNUNET_TIME_UNIT_MINUTES, &address_pretty_printer_cb, -- cgit v1.2.3