From 32f15a1d92cd08b93b145999d91f1cd0ca6c02b1 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Mon, 22 Feb 2010 14:42:04 +0000 Subject: [PATCH] add verbosity level to gnunet-nat-server --- src/transport/gnunet-nat-server.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/transport/gnunet-nat-server.c b/src/transport/gnunet-nat-server.c index b8d8290bd..e44847519 100644 --- a/src/transport/gnunet-nat-server.c +++ b/src/transport/gnunet-nat-server.c @@ -62,6 +62,8 @@ */ #define DUMMY_IP "1.2.3.4" +#define VERBOSE GNUNET_NO + /** * How often do we send our ICMP messages to receive replies? */ @@ -169,8 +171,10 @@ send_icmp_echo (const struct in_addr *my_ip) sizeof(dst)); if (err < 0) { +#if VERBOSE fprintf(stderr, "sendto failed: %s\n", strerror(errno)); +#endif } else if (err != off) { @@ -200,9 +204,11 @@ process_icmp_response () } if (have != sizeof (struct ip_packet) *2 + sizeof (struct icmp_packet) * 2) { +#if VERBOSE fprintf (stderr, "Received ICMP message of unexpected size: %u bytes\n", (unsigned int) have); +#endif return; } off = 0; -- 2.25.1