From: Nathan S. Evans Date: Mon, 22 Feb 2010 14:42:04 +0000 (+0000) Subject: add verbosity level to gnunet-nat-server X-Git-Tag: initial-import-from-subversion-38251~22631 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=32f15a1d92cd08b93b145999d91f1cd0ca6c02b1;p=oweals%2Fgnunet.git add verbosity level to gnunet-nat-server --- 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;