From: Stephen L Johnson Date: Sun, 4 Dec 2005 19:31:21 +0000 (+0000) Subject: fixed parm processing bug with $PAGE_MESSAGE (using uc instead of lc) X-Git-Tag: spong-2_8_0-beta3~1 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a36f0c727f87baa9f2cb74fee872ab2c73bd30c;p=spong.git fixed parm processing bug with $PAGE_MESSAGE (using uc instead of lc) add '--page' paramter to spong-message call when sending 'page' message --- diff --git a/src/spong-server.pl b/src/spong-server.pl index 59bb7c9..b804253 100755 --- a/src/spong-server.pl +++ b/src/spong-server.pl @@ -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.63 2003/07/17 02:45:33 sljohnson Exp $ +# $Id: spong-server.pl,v 1.64 2005/12/04 19:31:21 sljohnson Exp $ use lib "@@LIBDIR@@"; @@ -1260,10 +1260,10 @@ sub message_user { $message ); } } - } elsif ( $cmd eq "page" && uc($PAGE_MESSAGE) eq 'yes' ) { + } elsif ( $cmd eq "page" && lc($PAGE_MESSAGE) eq 'yes' ) { &debug("sending a page message notification",2); &send_message( $host, $service, $color, $time, $sum, $duration, - $message ); + $message, 1 ); } $SIG{'CHLD'} = \&chld_handler; @@ -1273,13 +1273,14 @@ sub message_user { # spong-message. sub send_message { - my ( $host, $service, $color, $time, $sum, $duration, $message ) = @_; + my ( $host, $service, $color, $time, $sum, $duration, $message, $page ) = @_; if ( -f $smessage ) { my @args; push @args,$smessage; if( $debug >= 3 ) { push @args,"--debug"; } if( $test ) { push @args,"--test"; } + if( $page ) { push @args,"--page"; } if( $message ) { push @args,"--message",$message; } push @args, $color, $host, $service, $time, $sum, $duration; system(@args);