]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pattern: split pat_ref_set()
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 20 Nov 2024 15:22:22 +0000 (16:22 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Tue, 26 Nov 2024 15:12:05 +0000 (16:12 +0100)
commit3d250b3be862746279e66d2acb50449bb9ef261b
treee480a200251bff4021bf34e9dcaea88834350008
parent4d58f521ee19887b4226acf657062c1a859c5f66
MINOR: pattern: split pat_ref_set()

split pat_ref_set() function in 2 distinct functions. Indeed, since
0844bed7d3 ("MEDIUM: map/acl: Improve pat_ref_set() efficiency (for
"set-map", "add-acl" action perfs)"), pat_ref_set() prototype was updated
to include an extra <elt> argument. But the logic behind is not explicit
because the function will not only try to set <elt>, but also its
duplicate (unlike pat_ref_set_elt() which only tries to update <elt>).

Thus, to make it clearer and better distinguish between the key-based
lookup version and the elt-based one, restotre pat_ref_set() previous
prototype and add a dedicated pat_ref_set_elt_duplicate() that takes
<elt> as argument and tries to update <elt> and all duplicates.
include/haproxy/pattern.h
src/hlua.c
src/http_act.c
src/map.c
src/pattern.c