]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: Log agent fail, stopped or down as info
authorSimon Horman <horms@verge.net.au>
Mon, 25 Nov 2013 01:46:34 +0000 (10:46 +0900)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Nov 2013 06:31:15 +0000 (07:31 +0100)
In the case where an agent check returns fail, stopped or down,
log this as info when logging the server status along with any
trailing message returned by the agent after fail, stopped or down.

Previously only the trailing message was logged as info and
if omitted no info was logged.

Signed-off-by: Simon Horman <horms@verge.net.au>
src/checks.c

index 6b7c382e4c0e64852b30c00f2aed618c223249b4..d865c0b2ff7c841cb7c6b182efd9f5c17fa871da 100644 (file)
@@ -1010,10 +1010,7 @@ static void event_srv_chk_r(struct connection *conn)
                         */
                        if (end[0] == '\0' || end[0] == ' ' || end[0] == '\t') {
                                status = HCHK_STATUS_L7STS;
-                               /* Skip over leading blanks */
-                               while (end[0] != '\0' && (end[0] == ' ' || end[0] == '\t'))
-                                       end++;
-                               desc = end;
+                               desc = check->bi->data;
                        }
                }