Download raw body.
bgpd: simplify some IMSG_SESSION_X code
On Tue, Jan 23, 2024 at 03:22:57PM +0100, Claudio Jeker wrote:
> Instead of using a combined case statement with conditional argument to
> peer_stale() just split the cases and call peer_stale() accordingly.
ok
>
> --
> :wq Claudio
>
> Index: rde.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
> diff -u -p -r1.614 rde.c
> --- rde.c 15 Jan 2024 15:44:50 -0000 1.614
> +++ rde.c 23 Jan 2024 10:00:10 -0000
> @@ -449,9 +449,10 @@ rde_dispatch_imsg_session(struct imsgbuf
>
> switch (imsg_get_type(&imsg)) {
> case IMSG_SESSION_STALE:
> + peer_stale(peer, aid, 0);
> + break;
> case IMSG_SESSION_NOGRACE:
> - peer_stale(peer, aid,
> - imsg_get_type(&imsg) == IMSG_SESSION_NOGRACE);
> + peer_stale(peer, aid, 1);
> break;
> case IMSG_SESSION_FLUSH:
> peer_flush(peer, aid, peer->staletime[aid]);
>
bgpd: simplify some IMSG_SESSION_X code