[Olsr-dev] [olsrd] [PATCH v1 04/29] gateway: make olsr_gw_default_lookup_gateway function static

Ferry Huberts (spam-protected)
Tue Jul 24 18:08:53 CEST 2012


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/gateway_default_handler.c |   40 ++++++++++++++++++++--------------------
 src/gateway_default_handler.h |    1 -
 2 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/src/gateway_default_handler.c b/src/gateway_default_handler.c
index 5255dcd..8864bc3 100644
--- a/src/gateway_default_handler.c
+++ b/src/gateway_default_handler.c
@@ -122,32 +122,13 @@ static void gw_default_timer(void *unused __attribute__ ((unused))) {
   }
 }
 
-/*
- * Exported functions
- */
-
-/**
- * initialization of default gateway handler
- */
-void olsr_gw_default_init(void) {
-  /* initialize values */
-  gw_def_nodecount = 0;
-  gw_def_stablecount = 0;
-  gw_def_finished_ipv4 = false;
-  gw_def_finished_ipv6 = false;
-  gw_def_timer = NULL;
-
-  /* setup default handler */
-  olsr_set_inetgw_handler(&gw_def_handler);
-}
-
 /**
  * Lookup a new gateway based on distance metric
  *
  * @param ipv4 lookup new v4 gateway
  * @param ipv6 lookup new v6 gateway
  */
-void olsr_gw_default_lookup_gateway(bool ipv4, bool ipv6) {
+static void olsr_gw_default_lookup_gateway(bool ipv4, bool ipv6) {
   if (ipv4) {
     /* get new ipv4 GW if we use OLSRv4 or NIIT */
     gw_def_finished_ipv4 = !(olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit);
@@ -163,6 +144,25 @@ void olsr_gw_default_lookup_gateway(bool ipv4, bool ipv6) {
 }
 
 /*
+ * Exported functions
+ */
+
+/**
+ * initialization of default gateway handler
+ */
+void olsr_gw_default_init(void) {
+  /* initialize values */
+  gw_def_nodecount = 0;
+  gw_def_stablecount = 0;
+  gw_def_finished_ipv4 = false;
+  gw_def_finished_ipv6 = false;
+  gw_def_timer = NULL;
+
+  /* setup default handler */
+  olsr_set_inetgw_handler(&gw_def_handler);
+}
+
+/*
  * Handler functions
  */
 
diff --git a/src/gateway_default_handler.h b/src/gateway_default_handler.h
index 86b81ba..d06f386 100644
--- a/src/gateway_default_handler.h
+++ b/src/gateway_default_handler.h
@@ -12,7 +12,6 @@
 #include "gateway.h"
 
 void olsr_gw_default_init(void);
-void olsr_gw_default_lookup_gateway(bool, bool);
 
 #endif /* !WIN32 */
 #endif /* GATEWAY_DEFAULT_HANDLER_H_ */
-- 
1.7.10.4





More information about the Olsr-dev mailing list