From c363d3861b5384a31465a72ddc3b0f6ff007a95a Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Sun, 24 Jan 2010 22:42:13 +0000 Subject: ospfd: Unify router and network LSA refresh logic with general refresher * (general) Get rid of the router and network LSA specific refresh timers and make the general refresher do this instead. Get rid of the twiddling of timers for router/network LSA that was spread across the code. This lays the foundations for future, general LSA refresh improvements, such as making sequence rollover work, and having generic LSA delays. * ospfd.h: (struct ospf) Bye bye to the router-lsa update timer thread pointer. (struct ospf_area) and to the router-lsa refresh timer. * ospf_interface.h: Remove the network_lsa_self timer thread pointer * ospf_lsa.h: (struct ospf_lsa) oi field should always be there, for benefit of type-2/network LSA processing. (ospf_{router,network}_lsa_{update_timer,timer_add}) no timers for these more (ospf_{router,network}_lsa_update) more generic functions to indicate that some router/network LSAs need updating (ospf_router_lsa_update_area) update router lsa in a particular area alone. (ospf_{summary,summary_asbr,network}_lsa_refresh) replaced by the general ospf_lsa_refresh function. (ospf_lsa_refresh) general LSA refresh function --- ospfd/ospf_flood.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ospfd/ospf_flood.c') diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 41661da2..06d75740 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -135,7 +135,7 @@ ospf_process_self_originated_lsa (struct ospf *ospf, /* Originate a new instance and schedule flooding */ if (area->router_lsa_self) area->router_lsa_self->data->ls_seqnum = new->data->ls_seqnum; - ospf_router_lsa_timer_add (area); + ospf_router_lsa_update_area (area); return; case OSPF_NETWORK_LSA: #ifdef HAVE_OPAQUE_LSA @@ -171,7 +171,7 @@ ospf_process_self_originated_lsa (struct ospf *ospf, if (oi->network_lsa_self) oi->network_lsa_self->data->ls_seqnum = new->data->ls_seqnum; /* Schedule network-LSA origination. */ - ospf_network_lsa_timer_add (oi); + ospf_network_lsa_update (oi); return; } break; -- cgit v1.2.1