0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-15 13:31:54 +00:00

Properly handling situations when birdloops are created before spawning threads

This commit is contained in:
Maria Matejka 2024-09-09 22:19:05 +02:00
parent 4e6cea4ed9
commit 20d8eaa7d3

View File

@ -568,6 +568,7 @@ static void bird_thread_busy_set(struct bird_thread *thr, int val);
struct birdloop_pickup_group pickup_groups[2] = { struct birdloop_pickup_group pickup_groups[2] = {
{ {
/* all zeroes */ /* 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 */ /* FIXME: make this dynamic, now it copies the loop_max_latency value from proto/bfd/config.Y */
@ -1009,6 +1010,7 @@ static void
bird_thread_start_event(void *_data) bird_thread_start_event(void *_data)
{ {
struct birdloop_pickup_group *group = _data; struct birdloop_pickup_group *group = _data;
if (group)
bird_thread_start(group); bird_thread_start(group);
} }