]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Properly handling situations when birdloops are created before spawning threads
authorMaria Matejka <mq@ucw.cz>
Mon, 9 Sep 2024 20:19:05 +0000 (22:19 +0200)
committerMaria Matejka <mq@ucw.cz>
Sun, 23 Feb 2025 18:01:48 +0000 (19:01 +0100)
sysdep/unix/io-loop.c

index 3f9c3fd9b8eaf92a8979797a2197891cc15bb3ea..fcda72a745a5954a14a09390f31afd0a826a14a7 100644 (file)
@@ -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;