From d77d6e63d19e35f409b5f4ac439e6204b90bfb80 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Sun, 24 Jan 2010 18:33:23 +0000 Subject: [PATCH] test case performs better, ping/pong happens correctly now (for me). Still requires testing and fixes, also udp still not working as it doesn't supply any addresses to be used in a hello. That should be a simple fix, the reason the test case is not working is likely a misunderstanding of what is supposed to be happening --- src/transport/test_plugin_transport.c | 2 +- src/transport/test_transport_api.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c index 2248f007e..f9539430e 100644 --- a/src/transport/test_plugin_transport.c +++ b/src/transport/test_plugin_transport.c @@ -37,7 +37,7 @@ #include "plugin_transport.h" #include "transport.h" -#define VERBOSE GNUNET_NO +#define VERBOSE GNUNET_YES /** * How long until we give up on transmitting the message? diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index e70a34e3e..596261b77 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -33,7 +33,7 @@ #define VERBOSE GNUNET_YES -#define VERBOSE_ARM GNUNET_YES +#define VERBOSE_ARM GNUNET_NO #define START_ARM GNUNET_YES @@ -180,8 +180,7 @@ exchange_hello_last (void *cls, struct PeerContext *me = cls; GNUNET_TRANSPORT_get_hello_cancel (p2.th, &exchange_hello_last, me); - /* Infinite loop, how was this supposed to work? *sound of nate ripping - * hair out* */ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Exchanging HELLO with peer (%p)!\n", cls); GNUNET_assert (ok >= 3); @@ -217,6 +216,9 @@ exchange_hello (void *cls, GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_id ((const struct GNUNET_HELLO_Message *) message, &me->id)); + + GNUNET_TRANSPORT_offer_hello (p2.th, message); + GNUNET_TRANSPORT_get_hello (p2.th, &exchange_hello_last, &p2); } -- 2.25.1