gw: move path_cost into the gateway struct, ensure it's always up-to-date
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 20 Feb 2014 14:21:24 +0000 (15:21 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 20 Feb 2014 14:21:37 +0000 (15:21 +0100)
commit1940f1d5b2709733bf6a1c89a2057145dc24ac6f
tree5230ea77f59bdef104ac4eb316739c56eb0383c1
parent07674c1a1e13f56c065f69133f71e3a56b4baa4f
gw: move path_cost into the gateway struct, ensure it's always up-to-date

In the process a lot of code surrounding the path costs can be simplified:
upon reception of a HNA we always calculate the costs, and when they have
changed, we re-sort the gateway list.
Therefore no other place in the code needs to do that, and path_cost can
always be used directly from the gateway struct.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/httpinfo/src/olsrd_httpinfo.c
lib/txtinfo/src/olsrd_txtinfo.c
src/gateway.c
src/gateway.h
src/gateway_default_handler.c
src/gateway_list.c
src/gateway_list.h