#define BGP_TIMER_OFF(T) \
do { \
- if (T) \
- THREAD_TIMER_OFF(T); \
+ THREAD_TIMER_OFF(T); \
} while (0)
#define BGP_EVENT_ADD(P, E) \
/* If new update is received before the current timer timed out,
* turn it off and start a new timer.
*/
- if (bm->t_rmap_update != NULL)
- THREAD_OFF(bm->t_rmap_update);
+ THREAD_OFF(bm->t_rmap_update);
/* rmap_update_timer of 0 means don't do route updates */
if (bm->rmap_update_timer) {
if (subgrp->update_group)
UPDGRP_INCR_STAT(subgrp->update_group, subgrps_deleted);
- if (subgrp->t_merge_check)
- THREAD_OFF(subgrp->t_merge_check);
+ THREAD_OFF(subgrp->t_merge_check);
- if (subgrp->t_coalesce)
- THREAD_TIMER_OFF(subgrp->t_coalesce);
+ THREAD_TIMER_OFF(subgrp->t_coalesce);
bpacket_queue_cleanup(SUBGRP_PKTQ(subgrp));
subgroup_clear_table(subgrp);
- if (subgrp->t_coalesce)
- THREAD_TIMER_OFF(subgrp->t_coalesce);
+ THREAD_TIMER_OFF(subgrp->t_coalesce);
sync_delete(subgrp);
if (BGP_DEBUG(update_groups, UPDATE_GROUPS) && subgrp->update_group)
return 0;
/* Shutdown packet reception and sending */
- if (ei->t_hello)
- THREAD_OFF(ei->t_hello);
+ THREAD_OFF(ei->t_hello);
eigrp_if_stream_unset(ei);
if (ldp_sync_info &&
ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED &&
ldp_sync_info->state != LDP_IGP_SYNC_STATE_NOT_REQUIRED) {
- if (ldp_sync_info->t_holddown != NULL) {
- THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
- ldp_sync_info->t_holddown = NULL;
- }
+ THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP;
isis_ldp_sync_set_if_metric(circuit, true);
}
ils_debug("ldp_sync: remove if %s", circuit->interface
? circuit->interface->name : "");
- if (ldp_sync_info->t_holddown)
- THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
+ THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
isis_ldp_sync_set_if_metric(circuit, true);
if (remove) {
* update state
*/
if (ldp_sync_info && ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED) {
- if (ldp_sync_info->t_holddown != NULL) {
- THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
- ldp_sync_info->t_holddown = NULL;
- }
+ THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
+
if (ldp_sync_info->state == LDP_IGP_SYNC_STATE_REQUIRED_UP)
ldp_sync_info->state =
LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP;
{
struct spf_backoff *backoff = THREAD_ARG(thread);
- backoff->t_holddown = NULL;
THREAD_TIMER_OFF(backoff->t_timetolearn);
timerclear(&backoff->first_event_time);
backoff->state = SPF_BACKOFF_QUIET;
if (ldp_sync_info &&
ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED &&
ldp_sync_info->state != LDP_IGP_SYNC_STATE_NOT_REQUIRED) {
- if (ldp_sync_info->t_holddown != NULL) {
- THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
- ldp_sync_info->t_holddown = NULL;
- }
+ THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
ldp_sync_info->state = LDP_IGP_SYNC_STATE_REQUIRED_NOT_UP;
ospf_if_recalculate_output_cost(ifp);
}
* restore cost
*/
ols_debug("ldp_sync: Removed from if %s", ifp->name);
- if (ldp_sync_info->t_holddown)
- THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
+ THREAD_TIMER_OFF(ldp_sync_info->t_holddown);
ldp_sync_info->state = LDP_IGP_SYNC_STATE_NOT_REQUIRED;
ospf_if_recalculate_output_cost(ifp);
if (!CHECK_FLAG(ldp_sync_info->flags, LDP_SYNC_FLAG_IF_CONFIG))
static void pim_free_bsrp_node(struct bsm_rpinfo *bsrp_info)
{
- if (bsrp_info->g2rp_timer)
- THREAD_OFF(bsrp_info->g2rp_timer);
+ THREAD_OFF(bsrp_info->g2rp_timer);
XFREE(MTYPE_PIM_BSRP_NODE, bsrp_info);
}
igmp_source_delete(src);
}
- if (group->t_group_query_retransmit_timer) {
- THREAD_OFF(group->t_group_query_retransmit_timer);
- }
+ THREAD_OFF(group->t_group_query_retransmit_timer);
group_timer_off(group);
igmp_group_count_decr(group->group_igmp_sock);
dmn->name, state_str[dmn->state]);
return;
}
- if (dmn->t_wakeup)
- THREAD_OFF(dmn->t_wakeup);
+ THREAD_OFF(dmn->t_wakeup);
if (try_connect(dmn) < 0)
SET_WAKEUP_DOWN(dmn);
}