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 <mjs@voltanet.io>
This commit is contained in:
Mark Stapp 2021-03-17 16:10:13 -04:00
parent a78a4e754e
commit e0d550dfea
3 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}