From 723569bc5d7bdb10f0d04e51f7fed59d867b966d Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 9 Sep 2024 22:19:05 +0200 Subject: [PATCH] Properly handling situations when birdloops are created before spawning threads --- sysdep/unix/io-loop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c index 3f9c3fd9..fcda72a7 100644 --- a/sysdep/unix/io-loop.c +++ b/sysdep/unix/io-loop.c @@ -573,6 +573,7 @@ static void bird_thread_busy_set(struct bird_thread *thr, int val); struct birdloop_pickup_group pickup_groups[2] = { { /* all zeroes */ + .start_threads.hook = bird_thread_start_event, }, { /* FIXME: make this dynamic, now it copies the loop_max_latency value from proto/bfd/config.Y */ @@ -1014,7 +1015,8 @@ static void bird_thread_start_event(void *_data) { struct birdloop_pickup_group *group = _data; - bird_thread_start(group); + if (group) + bird_thread_start(group); } static struct birdloop *thread_dropper;