gateway: stub out olsr_print_gateway_entries on #ifdef NODEBUG
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 1 Nov 2012 11:51:59 +0000 (12:51 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 1 Nov 2012 13:23:40 +0000 (14:23 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c
src/gateway.h

index 71f135f..7b690ef 100644 (file)
@@ -230,8 +230,8 @@ void olsr_trigger_inetgw_startup(void) {
 /**
  * Print debug information about gateway entries
  */
-void olsr_print_gateway_entries(void) {
 #ifndef NODEBUG
+void olsr_print_gateway_entries(void) {
   struct ipaddr_str buf;
   struct gateway_entry *gw;
   const int addrsize = olsr_cnf->ip_version == AF_INET ? 15 : 39;
@@ -253,8 +253,8 @@ void olsr_print_gateway_entries(void) {
         gw->downlink,
         gw->external_prefix.prefix_len == 0 ? "" : olsr_ip_prefix_to_string(&gw->external_prefix));
   } OLSR_FOR_ALL_GATEWAY_ENTRIES_END(gw)
-#endif /* NODEBUG */
 }
+#endif /* NODEBUG */
 
 /*
  * Tx Path Interface
index 91e9170..385a48e 100644 (file)
@@ -132,7 +132,11 @@ struct olsr_gw_handler {
 int olsr_init_gateways(void);
 void olsr_cleanup_gateways(void);
 void olsr_trigger_inetgw_startup(void);
+#ifndef NODEBUG
 void olsr_print_gateway_entries(void);
+#else
+#define olsr_print_gateway_entries() do { } while(0)
+#endif
 
 /*
  * Tx Path Interface