]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: counters: support passing the counter number as a fetch argument
authorWilly Tarreau <w@1wt.eu>
Tue, 23 Jul 2013 17:33:46 +0000 (19:33 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Aug 2013 19:17:14 +0000 (21:17 +0200)
commit4d4149cf3eca8c70afc5ee8601d0358bb8e1ccd0
treea1014c31d0194ec7bbec0503159d61d210f3ab50
parentb4c8493a9f0177689646670b035d095be6f38891
MEDIUM: counters: support passing the counter number as a fetch argument

One very annoying issue when trying to extend the sticky counters beyond
the current 3 counters is that it requires a massive copy-paste of fetch
functions (we don't have to copy-paste code anymore), just so that the
fetch names exist.

So let's have an alternate form like "sc_*(num)" to allow passing the
counter number as an argument without having to redefine new fetch names.
The MAX_SESS_STKCTR macro defines the number of usable sticky counters,
which defaults to 3.
doc/configuration.txt
src/session.c