gateway: use SmartGatewayUseCount setting the the gateway lists
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 20 Nov 2012 11:07:53 +0000 (12:07 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 13 Dec 2012 12:23:18 +0000 (13:23 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Reviewed-by: Henning Rogge <hrogge@googlemail.com>
src/gateway.c

index 5e1a713..eb6c0e9 100644 (file)
@@ -181,8 +181,8 @@ int olsr_init_gateways(void) {
 
   avl_init(&gateway_tree, avl_comp_default);
 
-  olsr_gw_list_init(&gw_list_ipv4, 1);
-  olsr_gw_list_init(&gw_list_ipv6, 1);
+  olsr_gw_list_init(&gw_list_ipv4, olsr_cnf->smart_gw_use_count);
+  olsr_gw_list_init(&gw_list_ipv6, olsr_cnf->smart_gw_use_count);
 
   current_ipv4_gw = NULL;
   current_ipv6_gw = NULL;