mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
BUG/MINOR: sample: Fix sample to retrieve the number of bytes received and sent
There was an issue in the if/else statement in smp_fetch_bytes() function. When req.bytes_in or req.bytes_out was requested, res.bytes_in was always returned. It is now fixed. This patch must be backported to 3.3.
This commit is contained in:
parent
e0728ebcf4
commit
4791501011
@ -5543,7 +5543,7 @@ static int smp_fetch_bytes(const struct arg *args, struct sample *smp, const cha
|
||||
|
||||
if (kw[2] == 'q') /* req.bytes_in or req.bytes_out */
|
||||
smp->data.u.sint = (kw[10] == 'i') ? logs->req_in : logs->req_out;
|
||||
if (kw[2] == 's') /* res.bytes_in or res.bytes_out */
|
||||
else if (kw[2] == 's') /* res.bytes_in or res.bytes_out */
|
||||
smp->data.u.sint = (kw[10] == 'i') ? logs->res_in : logs->res_out;
|
||||
else /* bytes_in or bytes_out */
|
||||
smp->data.u.sint = (kw[6] == 'i') ? logs->req_in : logs->res_in;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user