[Olsr-dev] [olsrd] [PATCH v1 24/29] gateway: add some asserts on gw_handler

Ferry Huberts (spam-protected)
Tue Jul 24 18:09:13 CEST 2012


From: Ferry Huberts <(spam-protected)>

---
 src/gateway.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gateway.c b/src/gateway.c
index 915f154..2ca3c00 100644
--- a/src/gateway.c
+++ b/src/gateway.c
@@ -222,6 +222,9 @@ olsr_init_gateways(void) {
    * can be overwritten with olsr_set_inetgw_handler
    */
   olsr_gw_default_init();
+
+  assert(gw_handler);
+
   return 0;
 }
 
@@ -442,6 +445,7 @@ olsr_print_gateway_entries(void) {
  */
 void
 olsr_set_inetgw_handler(struct olsr_gw_handler *h) {
+  assert(h);
   gw_handler = h;
 }
 
-- 
1.7.10.4





More information about the Olsr-dev mailing list