]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pattern: introduce pat_ref_delete_by_ptr() to delete a valid reference
authorWilly Tarreau <w@1wt.eu>
Mon, 2 Nov 2020 16:30:17 +0000 (17:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Nov 2020 18:27:09 +0000 (19:27 +0100)
commit1fd52f70e59ca87307d1599d63efae041e8f27f1
tree92bd2f820438d58cb2459add8f01483fc52de843
parenta98b2882ac998ba4a11404ce82d0246d4673700f
MINOR: pattern: introduce pat_ref_delete_by_ptr() to delete a valid reference

Till now the only way to remove a known reference was via
pat_ref_delete_by_id() which scans the whole list to find a matching pointer.
Let's add pat_ref_delete_by_ptr() which takes a valid pointer. It can be
called by the function above after the pointer is found, and can also be
used to roll back a failed insertion much more efficiently.
include/haproxy/pattern.h
src/pattern.c