]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stick-table: fix build with DEBUG_THREAD
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 12 Oct 2022 14:47:59 +0000 (16:47 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 12 Oct 2022 14:54:59 +0000 (16:54 +0200)
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

index c9f1fda3a93c57c106762dab44d3592c948e3cc0..c6fe243e8bb7e169ef4d1b7307b664052c83948f 100644 (file)
@@ -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);