From: Stephen L Johnson Date: Fri, 25 May 2001 14:30:46 +0000 (+0000) Subject: stop_after flag not being cleared after flagged service was checked X-Git-Tag: spong-2_7_5~4 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cba19955d9843368c1a8842dc99824fdf4e8603d;p=spong.git stop_after flag not being cleared after flagged service was checked --- diff --git a/src/spong-network.pl b/src/spong-network.pl index 907f76b..506ab40 100755 --- a/src/spong-network.pl +++ b/src/spong-network.pl @@ -17,7 +17,7 @@ # (2) Converted checks to new plugin mechanism (Stephen Johnson May 28, 1999) # Added user-configurable escalation mechanism # -# $Id: spong-network.pl,v 1.35 2001/05/07 19:19:24 sljohnson Exp $ +# $Id: spong-network.pl,v 1.36 2001/05/25 14:30:46 sljohnson Exp $ use Carp; use lib "@@LIBDIR@@"; @@ -101,6 +101,7 @@ while( 1 ) { $stopafter = 1; } else { $check = $_; + $stopafter = 0; } $0 = "spong-network (checking $host/$check)"; @@ -114,7 +115,7 @@ while( 1 ) { my $laststatus = $HOSTS{$host}{'service'}{$check}{'laststatus'} || 'green'; - if ($stopafter && $laststatus ne 'green') { + if ($stopafter && $laststatus eq 'red') { debug("Check $check failed for host $host," . " skipping remaining tests", 3); last; @@ -255,6 +256,7 @@ sub do_set_clear { $stop_after = 1; } else { $s = $_; + $stopafter = 0; } # If our service