From: Baptiste Assmann Date: Sat, 25 Apr 2015 14:03:06 +0000 (+0200) Subject: BUG/MEDIUM: check: tcpcheck regression introduced by e16c1b3f X-Git-Tag: v1.6-dev2~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f95bc8e3e0800dcf22194a43edce837d0baae772;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: check: tcpcheck regression introduced by e16c1b3f The commit e16c1b3f changed the way the function tcpcheck_get_step_id is now called (check instead of server). This change introduced a regression since now this function would return 0 all the time because of: if (check->current_step) return 0; This patch fixes this issue by inversing the test: you want to return 0 only if current_step is not yet set :) No backport is needed. --- diff --git a/src/checks.c b/src/checks.c index 3702d9a4b0..8a0231deb0 100644 --- a/src/checks.c +++ b/src/checks.c @@ -2363,7 +2363,7 @@ static int tcpcheck_get_step_id(struct check *check) int i = 0; /* not even started anything yet => step 0 = initial connect */ - if (check->current_step) + if (!check->current_step) return 0; cur = check->last_started_step;