add verbosity level to gnunet-nat-server
authorNathan S. Evans <evans@in.tum.de>
Mon, 22 Feb 2010 14:42:04 +0000 (14:42 +0000)
committerNathan S. Evans <evans@in.tum.de>
Mon, 22 Feb 2010 14:42:04 +0000 (14:42 +0000)
src/transport/gnunet-nat-server.c

index b8d8290bd44bb9006eec77ece7ac606d3f3c441f..e44847519f474d7b3a467067aa529ae72ee94a90 100644 (file)
@@ -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;