From: Maria Matejka Date: Mon, 9 Sep 2024 20:19:05 +0000 (+0200) Subject: Properly handling situations when birdloops are created before spawning threads X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed63bc9ad41df1c9139fa40a6a8e9310408c65b8;p=thirdparty%2Fbird.git Properly handling situations when birdloops are created before spawning threads --- diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c index 3f9c3fd9b..fcda72a74 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;