diff options
Diffstat (limited to 'isisd/fabricd.c')
| -rw-r--r-- | isisd/fabricd.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/isisd/fabricd.c b/isisd/fabricd.c index 1a081bbea6..57e9e91c15 100644 --- a/isisd/fabricd.c +++ b/isisd/fabricd.c @@ -239,14 +239,11 @@ struct fabricd *fabricd_new(struct isis_area *area) void fabricd_finish(struct fabricd *f) { - if (f->initial_sync_timeout) - thread_cancel(f->initial_sync_timeout); + thread_cancel(&(f->initial_sync_timeout)); - if (f->tier_calculation_timer) - thread_cancel(f->tier_calculation_timer); + thread_cancel(&(f->tier_calculation_timer)); - if (f->tier_set_timer) - thread_cancel(f->tier_set_timer); + thread_cancel(&(f->tier_set_timer)); isis_spftree_del(f->spftree); neighbor_lists_clear(f); @@ -340,8 +337,7 @@ void fabricd_initial_sync_finish(struct isis_area *area) f->initial_sync_circuit->interface->name); f->initial_sync_state = FABRICD_SYNC_COMPLETE; f->initial_sync_circuit = NULL; - thread_cancel(f->initial_sync_timeout); - f->initial_sync_timeout = NULL; + thread_cancel(&(f->initial_sync_timeout)); } static void fabricd_bump_tier_calculation_timer(struct fabricd *f); @@ -437,22 +433,15 @@ static int fabricd_tier_calculation_cb(struct thread *thread) static void fabricd_bump_tier_calculation_timer(struct fabricd *f) { /* Cancel timer if we already know our tier */ - if (f->tier != ISIS_TIER_UNDEFINED - || f->tier_set_timer) { - if (f->tier_calculation_timer) { - thread_cancel(f->tier_calculation_timer); - f->tier_calculation_timer = NULL; - } + if (f->tier != ISIS_TIER_UNDEFINED || f->tier_set_timer) { + thread_cancel(&(f->tier_calculation_timer)); return; } /* If we need to calculate the tier, wait some * time for the topology to settle before running * the calculation */ - if (f->tier_calculation_timer) { - thread_cancel(f->tier_calculation_timer); - f->tier_calculation_timer = NULL; - } + thread_cancel(&(f->tier_calculation_timer)); thread_add_timer(master, fabricd_tier_calculation_cb, f, 2 * f->area->lsp_gen_interval[ISIS_LEVEL2 - 1], @@ -737,7 +726,7 @@ void fabricd_trigger_csnp(struct isis_area *area, bool circuit_scoped) if (!circuit->t_send_csnp[1]) continue; - thread_cancel(circuit->t_send_csnp[ISIS_LEVEL2 - 1]); + thread_cancel(&(circuit->t_send_csnp[ISIS_LEVEL2 - 1])); thread_add_timer_msec(master, send_l2_csnp, circuit, isis_jitter(f->csnp_delay, CSNP_JITTER), &circuit->t_send_csnp[ISIS_LEVEL2 - 1]); |
