From 08db56809eff3599cd47792d3dd8c5f0c27a11a8 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Tue, 19 Jan 2010 14:53:10 +0000 Subject: [PATCH] small changes --- src/transport/plugin_transport_udp.c | 2 +- src/transport/test_plugin_transport_udp.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 1d5e988b5..5dca2a748 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -40,7 +40,7 @@ #include "plugin_transport.h" #include "transport.h" -#define DEBUG_UDP GNUNET_YES +#define DEBUG_UDP GNUNET_NO /** * The default maximum size of each outbound UDP message, diff --git a/src/transport/test_plugin_transport_udp.c b/src/transport/test_plugin_transport_udp.c index 62e12e1cd..1bfe0f269 100644 --- a/src/transport/test_plugin_transport_udp.c +++ b/src/transport/test_plugin_transport_udp.c @@ -147,12 +147,25 @@ validation_notification (void *cls, const struct GNUNET_PeerIdentity *peer, uint32_t challenge, const char *sender_addr) { + struct sockaddr_storage *addr = (struct sockaddr_storage *)sender_addr; + if (validation_timeout_task != GNUNET_SCHEDULER_NO_TASK) { GNUNET_SCHEDULER_cancel (sched, validation_timeout_task); validation_timeout_task = GNUNET_SCHEDULER_NO_TASK; } + switch (addr->ss_family) + { + case AF_INET: + GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, "udp", _ + ("got address %s\n"),GNUNET_a2s((struct sockaddr *)addr, INET_ADDRSTRLEN)); + case AF_INET6: + GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, "udp", _ + ("got address %s\n"),GNUNET_a2s((struct sockaddr *)addr, INET6_ADDRSTRLEN)); + } + + GNUNET_assert (challenge == 42); ok = 0; /* if the last test succeeded, report success */ -- 2.25.1