diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-06-03 16:28:11 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-07-21 14:27:35 +0200 |
commit | cccd44f3b1ae4f6e16c9183c5222ba767340d1f7 (patch) | |
tree | cdd63cd1e85f5cdbde2efce31827de9c4980f665 /ospfd/ospfd.c | |
parent | Merge pull request #11653 from louis-6wind/fix-isis-sr-php (diff) | |
download | frr-cccd44f3b1ae4f6e16c9183c5222ba767340d1f7.tar.xz frr-cccd44f3b1ae4f6e16c9183c5222ba767340d1f7.zip |
ospfd: Remove various macros that overlap THREAD_OFF
Let's just use THREAD_OFF consistently in the code base
instead of each daemon having a special macro that needs to
be looked at and remembered what it does.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 33872950a..d10c03e58 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -572,7 +572,7 @@ static struct ospf *ospf_lookup_by_name(const char *vrf_name) static void ospf_deferred_shutdown_finish(struct ospf *ospf) { ospf->stub_router_shutdown_time = OSPF_STUB_ROUTER_UNCONFIGURED; - OSPF_TIMER_OFF(ospf->t_deferred_shutdown); + THREAD_OFF(ospf->t_deferred_shutdown); ospf_finish_final(ospf); @@ -754,7 +754,7 @@ static void ospf_finish_final(struct ospf *ospf) /* Clear static neighbors */ for (rn = route_top(ospf->nbr_nbma); rn; rn = route_next(rn)) if ((nbr_nbma = rn->info)) { - OSPF_POLL_TIMER_OFF(nbr_nbma->t_poll); + THREAD_OFF(nbr_nbma->t_poll); if (nbr_nbma->nbr) { nbr_nbma->nbr->nbr_nbma = NULL; @@ -790,22 +790,22 @@ static void ospf_finish_final(struct ospf *ospf) } /* Cancel all timers. */ - OSPF_TIMER_OFF(ospf->t_read); - OSPF_TIMER_OFF(ospf->t_write); - OSPF_TIMER_OFF(ospf->t_spf_calc); - OSPF_TIMER_OFF(ospf->t_ase_calc); - OSPF_TIMER_OFF(ospf->t_maxage); - OSPF_TIMER_OFF(ospf->t_maxage_walker); - OSPF_TIMER_OFF(ospf->t_abr_task); - OSPF_TIMER_OFF(ospf->t_asbr_check); - OSPF_TIMER_OFF(ospf->t_asbr_nssa_redist_update); - OSPF_TIMER_OFF(ospf->t_distribute_update); - OSPF_TIMER_OFF(ospf->t_lsa_refresher); - OSPF_TIMER_OFF(ospf->t_opaque_lsa_self); - OSPF_TIMER_OFF(ospf->t_sr_update); - OSPF_TIMER_OFF(ospf->t_default_routemap_timer); - OSPF_TIMER_OFF(ospf->t_external_aggr); - OSPF_TIMER_OFF(ospf->gr_info.t_grace_period); + THREAD_OFF(ospf->t_read); + THREAD_OFF(ospf->t_write); + THREAD_OFF(ospf->t_spf_calc); + THREAD_OFF(ospf->t_ase_calc); + THREAD_OFF(ospf->t_maxage); + THREAD_OFF(ospf->t_maxage_walker); + THREAD_OFF(ospf->t_abr_task); + THREAD_OFF(ospf->t_asbr_check); + THREAD_OFF(ospf->t_asbr_nssa_redist_update); + THREAD_OFF(ospf->t_distribute_update); + THREAD_OFF(ospf->t_lsa_refresher); + THREAD_OFF(ospf->t_opaque_lsa_self); + THREAD_OFF(ospf->t_sr_update); + THREAD_OFF(ospf->t_default_routemap_timer); + THREAD_OFF(ospf->t_external_aggr); + THREAD_OFF(ospf->gr_info.t_grace_period); LSDB_LOOP (OPAQUE_AS_LSDB(ospf), rn, lsa) ospf_discard_from_db(ospf, ospf->lsdb, lsa); @@ -992,8 +992,8 @@ static void ospf_area_free(struct ospf_area *area) free(IMPORT_NAME(area)); /* Cancel timer. */ - OSPF_TIMER_OFF(area->t_stub_router); - OSPF_TIMER_OFF(area->t_opaque_lsa_self); + THREAD_OFF(area->t_stub_router); + THREAD_OFF(area->t_opaque_lsa_self); if (OSPF_IS_AREA_BACKBONE(area)) area->ospf->backbone = NULL; @@ -1836,7 +1836,7 @@ int ospf_timers_refresh_set(struct ospf *ospf, int interval) - (monotime(NULL) - ospf->lsa_refresher_started); if (time_left > interval) { - OSPF_TIMER_OFF(ospf->t_lsa_refresher); + THREAD_OFF(ospf->t_lsa_refresher); thread_add_timer(master, ospf_lsa_refresh_walker, ospf, interval, &ospf->t_lsa_refresher); } @@ -1853,7 +1853,7 @@ int ospf_timers_refresh_unset(struct ospf *ospf) - (monotime(NULL) - ospf->lsa_refresher_started); if (time_left > OSPF_LSA_REFRESH_INTERVAL_DEFAULT) { - OSPF_TIMER_OFF(ospf->t_lsa_refresher); + THREAD_OFF(ospf->t_lsa_refresher); ospf->t_lsa_refresher = NULL; thread_add_timer(master, ospf_lsa_refresh_walker, ospf, OSPF_LSA_REFRESH_INTERVAL_DEFAULT, @@ -1905,7 +1905,7 @@ static void ospf_nbr_nbma_delete(struct ospf *ospf, static void ospf_nbr_nbma_down(struct ospf_nbr_nbma *nbr_nbma) { - OSPF_TIMER_OFF(nbr_nbma->t_poll); + THREAD_OFF(nbr_nbma->t_poll); if (nbr_nbma->nbr) { nbr_nbma->nbr->nbr_nbma = NULL; @@ -2094,7 +2094,7 @@ int ospf_nbr_nbma_poll_interval_set(struct ospf *ospf, struct in_addr nbr_addr, if (nbr_nbma->v_poll != interval) { nbr_nbma->v_poll = interval; if (nbr_nbma->oi && ospf_if_is_up(nbr_nbma->oi)) { - OSPF_TIMER_OFF(nbr_nbma->t_poll); + THREAD_OFF(nbr_nbma->t_poll); OSPF_POLL_TIMER_ON(nbr_nbma->t_poll, ospf_poll_timer, nbr_nbma->v_poll); } |