From 9e48d717cf681dcc3cfaaee4358b5c6fa3aa409e Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Wed, 3 May 2000 22:36:12 +0000 Subject: Test for "flushing" added. --- proto/ospf/topology.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'proto/ospf/topology.c') diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 57ac0888..22f463c3 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -159,7 +159,7 @@ age_timer_hook(timer *timer) struct top_hash_entry *en,*nxt; int flush=0; - /* FIXME Fill flush! */ + flush=can_flush_lsa(oa); if((delta=now-oa->lage)>=AGINGDELTA) { @@ -515,7 +515,6 @@ can_flush_lsa(struct ospf_area *oa) struct ospf_iface *ifa; struct ospf_neighbor *n; struct proto_ospf *po=oa->po; - int flush=1; WALK_LIST(ifa, iface_list) { @@ -523,14 +522,13 @@ can_flush_lsa(struct ospf_area *oa) { WALK_LIST(n, ifa->neigh_list) { - if(n->state==NEIGHBOR_EXCHANGE||n->state==NEIGHBOR_LOADING) + if((n->state==NEIGHBOR_EXCHANGE)||(n->state==NEIGHBOR_LOADING)) { - flush=0; - break; + return 0; } } } } - return flush; + return 1; } -- cgit v1.2.3