From: Amaury Denoyelle Date: Wed, 12 Oct 2022 14:47:59 +0000 (+0200) Subject: BUG/MINOR: stick-table: fix build with DEBUG_THREAD X-Git-Tag: v2.7-dev8~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e0648837c33f8122872ae6a4859748e7d5002f4;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/stick_table.c b/src/stick_table.c index c9f1fda3a9..c6fe243e8b 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);