diff options
Diffstat (limited to 'vrrpd/vrrp.c')
-rw-r--r-- | vrrpd/vrrp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index 0bccdce36..7a779307d 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -900,7 +900,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src, if (pkt->hdr.priority == 0) { vrrp_send_advertisement(r); - THREAD_OFF(r->t_adver_timer); + EVENT_OFF(r->t_adver_timer); event_add_timer_msec(master, vrrp_adver_timer_expire, r, r->vr->advertisement_interval * CS2MS, @@ -913,13 +913,13 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src, "Received advertisement from %s w/ priority %hhu; switching to Backup", r->vr->vrid, family2str(r->family), sipstr, pkt->hdr.priority); - THREAD_OFF(r->t_adver_timer); + EVENT_OFF(r->t_adver_timer); if (r->vr->version == 3) { r->master_adver_interval = htons(pkt->hdr.v3.adver_int); } vrrp_recalculate_timers(r); - THREAD_OFF(r->t_master_down_timer); + EVENT_OFF(r->t_master_down_timer); event_add_timer_msec(master, vrrp_master_down_timer_expire, r, r->master_down_interval * CS2MS, @@ -936,7 +936,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src, break; case VRRP_STATE_BACKUP: if (pkt->hdr.priority == 0) { - THREAD_OFF(r->t_master_down_timer); + EVENT_OFF(r->t_master_down_timer); event_add_timer_msec( master, vrrp_master_down_timer_expire, r, r->skew_time * CS2MS, &r->t_master_down_timer); @@ -947,7 +947,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src, ntohs(pkt->hdr.v3.adver_int); } vrrp_recalculate_timers(r); - THREAD_OFF(r->t_master_down_timer); + EVENT_OFF(r->t_master_down_timer); event_add_timer_msec(master, vrrp_master_down_timer_expire, r, r->master_down_interval * CS2MS, @@ -978,7 +978,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src, */ static void vrrp_read(struct event *thread) { - struct vrrp_router *r = THREAD_ARG(thread); + struct vrrp_router *r = EVENT_ARG(thread); struct vrrp_pkt *pkt; ssize_t pktsize; @@ -1405,7 +1405,7 @@ static void vrrp_change_state_backup(struct vrrp_router *r) vrrp_zebra_radv_set(r, false); /* Disable Adver_Timer */ - THREAD_OFF(r->t_adver_timer); + EVENT_OFF(r->t_adver_timer); r->advert_pending = false; r->garp_pending = false; @@ -1475,7 +1475,7 @@ static void vrrp_change_state(struct vrrp_router *r, int to) */ static void vrrp_adver_timer_expire(struct event *thread) { - struct vrrp_router *r = THREAD_ARG(thread); + struct vrrp_router *r = EVENT_ARG(thread); DEBUGD(&vrrp_dbg_proto, VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM @@ -1503,7 +1503,7 @@ static void vrrp_adver_timer_expire(struct event *thread) */ static void vrrp_master_down_timer_expire(struct event *thread) { - struct vrrp_router *r = THREAD_ARG(thread); + struct vrrp_router *r = EVENT_ARG(thread); zlog_info(VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM "Master_Down_Timer expired", @@ -1632,10 +1632,10 @@ static int vrrp_shutdown(struct vrrp_router *r) } /* Cancel all timers */ - THREAD_OFF(r->t_adver_timer); - THREAD_OFF(r->t_master_down_timer); - THREAD_OFF(r->t_read); - THREAD_OFF(r->t_write); + EVENT_OFF(r->t_adver_timer); + EVENT_OFF(r->t_master_down_timer); + EVENT_OFF(r->t_read); + EVENT_OFF(r->t_write); /* Protodown macvlan */ if (r->mvl_ifp) |