diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-09-05 09:10:42 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-09-05 09:10:42 +0000 |
commit | c09edda8e8071c6e5ca6b76e7c75a7b8402010ed (patch) | |
tree | 8bec52dec1f128591aec668ce7dc5ca814f048a1 /src/transport/test_plugin_transport.c | |
parent | 040178d83a1df5ad24cc17db89e1008ca6fbea4e (diff) | |
download | gnunet-c09edda8e8071c6e5ca6b76e7c75a7b8402010ed.tar.gz gnunet-c09edda8e8071c6e5ca6b76e7c75a7b8402010ed.zip |
- fix for 2nd cb
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r-- | src/transport/test_plugin_transport.c | 13 |
1 files changed, 10 insertions, 3 deletions
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, | |||
287 | return GNUNET_TIME_relative_get_zero_(); | 287 | return GNUNET_TIME_relative_get_zero_(); |
288 | } | 288 | } |
289 | 289 | ||
290 | |||
291 | static int got_reply; | ||
292 | |||
290 | /** | 293 | /** |
291 | * Take the given address and append it to the set of results sent back to | 294 | * Take the given address and append it to the set of results sent back to |
292 | * the client. | 295 | * the client. |
@@ -299,13 +302,17 @@ address_pretty_printer_cb (void *cls, const char *buf) | |||
299 | { | 302 | { |
300 | if (NULL != buf) | 303 | if (NULL != buf) |
301 | { | 304 | { |
305 | got_reply = GNUNET_YES; | ||
302 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 306 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
303 | "Pretty address : `%s'\n", buf); | 307 | "Pretty address : `%s'\n", buf); |
304 | } | 308 | } |
305 | else | 309 | else |
306 | { | 310 | { |
307 | GNUNET_break (0); | 311 | if (GNUNET_NO == got_reply) |
308 | end_badly_now (); | 312 | { |
313 | GNUNET_break (0); | ||
314 | end_badly_now (); | ||
315 | } | ||
309 | } | 316 | } |
310 | } | 317 | } |
311 | 318 | ||
@@ -333,7 +340,7 @@ env_notify_address (void *cls, | |||
333 | w->addrlen = addrlen; | 340 | w->addrlen = addrlen; |
334 | memcpy (w->addr, addr, addrlen); | 341 | memcpy (w->addr, addr, addrlen); |
335 | GNUNET_CONTAINER_DLL_insert(head, tail, w); | 342 | GNUNET_CONTAINER_DLL_insert(head, tail, w); |
336 | 343 | got_reply = GNUNET_NO; | |
337 | api->address_pretty_printer (api->cls, plugin, addr, addrlen, | 344 | api->address_pretty_printer (api->cls, plugin, addr, addrlen, |
338 | GNUNET_YES, GNUNET_TIME_UNIT_MINUTES, | 345 | GNUNET_YES, GNUNET_TIME_UNIT_MINUTES, |
339 | &address_pretty_printer_cb, | 346 | &address_pretty_printer_cb, |