From 22fde8efd5506450bf43392162a5f4e6f69bee19 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Wed, 5 Apr 2000 03:41:34 +0000 Subject: [PATCH] changed overview and ovproblems to grp-summary and grp-problems. wasn't closing duplicate $sock and $client file handles in added forking code --- src/spong-server.pl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/spong-server.pl b/src/spong-server.pl index aa51bba..a3cfcbe 100755 --- a/src/spong-server.pl +++ b/src/spong-server.pl @@ -247,6 +247,8 @@ sub listen_for_updates { elsif ( $pid ) { } # I'm the parent else { # I'm the kid + undef $sock; # We dont need this anymore + # Read all from the client, and disconnect my( $header, $ok ) = ( "", 0 ); @@ -288,7 +290,7 @@ sub listen_for_updates { exit; } # End child processing } continue { -# undef $client; + undef $client; # We don't need this any more } } @@ -340,6 +342,8 @@ sub listen_for_bb_updates { elsif ( $pid ) { } # I'm the parent else { # I'm the child + undef $sock; # We don't need this + # Read all from the client, and disconnect, my( $header, $ok ) = ( "", 0 ); my( $message, $cnt, $line ) = ( "", "", "" ); @@ -375,6 +379,8 @@ sub listen_for_bb_updates { exit; } + } continue { + undef $client; # We don't need this } } @@ -461,8 +467,8 @@ sub listen_for_queries { if( $query eq "info" ) { &show_info( @args ); } if( $query eq "service" ) { &show_service( @args, $other ); } if( $query eq "histservice" ) { &show_hist_service( @args, $other ); } - if( $query eq "overview" ) { &show_overview( @args, $other ); } - if( $query eq "ovproblems" ) { &show_ovproblems( @args, $other ); } + if( $query eq "grp-summary" ) { &show_grp_summary( @args, $other ); } + if( $query eq "grp-problems" ) { &show_grp_problems( @args, $other ); } undef $client; select $output; @@ -882,7 +888,7 @@ sub show_problems { my( $hosts, $type, $view ) = @_; Spong::HostList->new( hostlist($hosts) )->display_problems( $type, $view );} -sub show_ovproblems { +sub show_grp_problems { my ( $host, $type, $view ) = @_; Spong::HostGroups->new("ALL")->display_problems( $type, $view );} @@ -1007,7 +1013,7 @@ sub show_hist_service { } } -sub show_overview { +sub show_grp_summary { my( $hosts, $type, $view, $other ) = @_; my( $g ); $other = "ALL" if ! $other; -- 2.30.2