From 3e0648837c33f8122872ae6a4859748e7d5002f4 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 12 Oct 2022 16:47:59 +0200 Subject: [PATCH] BUG/MINOR: stick-table: fix build with DEBUG_THREAD Compilation is broken with DEBUG_THREAD since the following patch 76642223f014f89cd1f374291798499f4fba7dde MEDIUM: stick-table: switch the table lock to rwlock Fix this by updating a legacy HA_SPIN_INIT() to HA_RWLOCK_INIT(). No backport needed unless the mentionned patch is backported. --- src/stick_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stick_table.c b/src/stick_table.c index c9f1fda3a..c6fe243e8 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -699,7 +699,7 @@ int stktable_init(struct stktable *t) t->keys = EB_ROOT_UNIQUE; memset(&t->exps, 0, sizeof(t->exps)); t->updates = EB_ROOT_UNIQUE; - HA_SPIN_INIT(&t->lock); + HA_RWLOCK_INIT(&t->lock); t->pool = create_pool("sticktables", sizeof(struct stksess) + round_ptr_size(t->data_size) + t->key_size, MEM_F_SHARED);