]> git.etc.gen.nz Git - spong.git/commitdiff
added code to skip a status that are already purple in the stale data scan
authorStephen L Johnson <sjohnson@monsters.org>
Wed, 16 Jul 2003 17:50:40 +0000 (17:50 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Wed, 16 Jul 2003 17:50:40 +0000 (17:50 +0000)
src/spong-server.pl

index a3ffd25b0e34876fe59a8c0cf0d9e0726d6f8e44..1efc634056cd44d9e0082988add1b53e67eeb836 100755 (executable)
@@ -6,7 +6,7 @@
 # There are one or more update processes that listen for status updates 
 # from client programs.
 
-# $Id: spong-server.pl,v 1.60 2003/06/02 20:54:27 sljohnson Exp $
+# $Id: spong-server.pl,v 1.61 2003/07/16 17:50:40 sljohnson Exp $
 
 use lib "@@LIBDIR@@";
 
@@ -451,7 +451,9 @@ sub listen_for_queries {
          foreach $host ( Spong::HostList->new( "all" )->hosts() ) {
             foreach $service ( $host->service_names() ) {
               $main::SERVICES{$service}=1;
-              my ($color )=($host->service($service))->color();
+              my ($rcolor)=($host->service($service))->rcolor();  # If real color is purple
+              next if $rcolor eq 'purple';                        # don't bother updating
+              my ($color)=($host->service($service))->color();
               my ($summary)=($host->service($service))->summary();
               my ($message)=($host->service($service))->message();
               my ($stime) = time();