]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: the maxage_lsa_remover should check whether it needs to yield the cpu
authorPaul Jakma <paul@quagga.net>
Sat, 9 Jan 2010 14:11:02 +0000 (14:11 +0000)
committerPaul Jakma <paul@quagga.net>
Wed, 8 Dec 2010 17:11:18 +0000 (17:11 +0000)
ospfd/ospf_lsa.c

index dbf0f41737eedf8f6384608203a236f449180709..0c23909bd8489b588f647fcd52ce602ee3a0c652 100644 (file)
@@ -2911,7 +2911,11 @@ ospf_maxage_lsa_remover (struct thread *thread)
             reschedule = 1;
             continue;
           }
-
+        
+        /* TODO: maybe convert this function to a work-queue */
+        if (thread_should_yield (thread))
+          OSPF_TIMER_ON (ospf->t_maxage, ospf_maxage_lsa_remover, 0);
+          
         /* Remove LSA from the LSDB */
         if (CHECK_FLAG (lsa->flags, OSPF_LSA_SELF))
           if (IS_DEBUG_OSPF (lsa, LSA_FLOODING))