From: Christopher Faulet Date: Wed, 13 Oct 2021 15:58:53 +0000 (+0200) Subject: BUG/MINOR: sample: Fix 'fix_tag_value' sample when waiting for more data X-Git-Tag: v2.5-dev10~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a5aa08274241b519fcfe3077ec0cc336921392be;p=thirdparty%2Fhaproxy.git BUG/MINOR: sample: Fix 'fix_tag_value' sample when waiting for more data The test on the return value of fix_tag_value() function was inverted. To wait for more data, the return value must be a valid empty string and not IST_NULL. This patch must be backported to 2.4. --- diff --git a/src/sample.c b/src/sample.c index 47ccfbb0b3..d5ce8ad6ce 100644 --- a/src/sample.c +++ b/src/sample.c @@ -3126,7 +3126,7 @@ static int sample_conv_fix_tag_value(const struct arg *arg_p, struct sample *smp value = fix_tag_value(ist2(smp->data.u.str.area, smp->data.u.str.data), arg_p[0].data.sint); if (!istlen(value)) { - if (!isttest(value)) { + if (isttest(value)) { /* value != IST_NULL, need more data */ smp->flags |= SMP_F_MAY_CHANGE; }