From b699c208e858032ffd1218a4e22cb822895fa097 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 24 Oct 2006 08:34:31 +0000 Subject: Restored accidently regressed fix git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1521 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_http.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/check_http.c b/plugins/check_http.c index 188e9ec0..abd8aa8d 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -1094,9 +1094,8 @@ redir (char *pos, char *status_line) die (STATE_UNKNOWN, _("Could not allocate url\n")); while (pos) { - - if (sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i) < 1) { - + sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i); + if (i == 0) { pos += (size_t) strcspn (pos, "\r\n"); pos += (size_t) strspn (pos, "\r\n"); if (strlen(pos) == 0) -- cgit v1.2.3-74-g34f1