From 20d8eaa7d35ea6cf3682e127daadc06e9041a984 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 bef17714..9d2aa83f 100644 --- a/sysdep/unix/io-loop.c +++ b/sysdep/unix/io-loop.c @@ -568,6 +568,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 */ @@ -1009,7 +1010,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;