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 <ho...@verge.net.au>
---
 src/checks.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/checks.c b/src/checks.c
index a9a93ae..706ed31 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -867,10 +867,7 @@ static void agent_expect(struct check *check, char *data)
                 */
                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 = data;
                }
        }
 
-- 
1.7.10.4


Reply via email to