From: Mark Stapp Date: Wed, 17 Mar 2021 20:10:13 +0000 (-0400) Subject: bgpd: use add_event instead of add_timer with zero timeout X-Git-Tag: base_8.0~261^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e0d550dfea0ff72a2192e4193f3d67af5748859c;p=mirror%2Ffrr.git bgpd: use add_event instead of add_timer with zero timeout Just use events in a few places where timers with zero timeout were being used. Signed-off-by: Mark Stapp --- diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 757d76f69e..6abba18418 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -343,8 +343,8 @@ static struct peer *peer_xfer_conn(struct peer *from_peer) bgp_reads_on(peer); bgp_writes_on(peer); - thread_add_timer_msec(bm->master, bgp_process_packet, peer, 0, - &peer->t_process_packet); + thread_add_event(bm->master, bgp_process_packet, peer, 0, + &peer->t_process_packet); return (peer); } diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c index 7aa489e932..a696d95697 100644 --- a/bgpd/bgp_io.c +++ b/bgpd/bgp_io.c @@ -268,8 +268,8 @@ static int bgp_process_reads(struct thread *thread) thread_add_read(fpt->master, bgp_process_reads, peer, peer->fd, &peer->t_read); if (added_pkt) - thread_add_timer_msec(bm->master, bgp_process_packet, - peer, 0, &peer->t_process_packet); + thread_add_event(bm->master, bgp_process_packet, + peer, 0, &peer->t_process_packet); } return 0; diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index f04b89594e..e08f19fb45 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -2680,7 +2680,7 @@ int bgp_process_packet(struct thread *thread) frr_with_mutex(&peer->io_mtx) { // more work to do, come back later if (peer->ibuf->count > 0) - thread_add_timer_msec( + thread_add_event( bm->master, bgp_process_packet, peer, 0, &peer->t_process_packet); }