gateway: add some asserts on gw_handler
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 24 Jul 2012 15:30:24 +0000 (17:30 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 25 Jul 2012 06:55:06 +0000 (08:55 +0200)
src/gateway.c

index e1c0fa2..114fbe6 100644 (file)
@@ -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;
 }