Fixed scope of VERBOSE constant references.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@257 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-01-07 13:08:59 +00:00
parent d05771d8e0
commit 7cee3a4c55
1 changed files with 8 additions and 8 deletions

View File

@ -303,12 +303,12 @@ sub runServer
my $task_list; my $task_list;
if ( $state == 1 && $monitor->{LastState} == 0 ) # Gone into alarm state if ( $state == 1 && $monitor->{LastState} == 0 ) # Gone into alarm state
{ {
print( "Applying ON_list\n" ) if ( VERBOSE ); print( "Applying ON_list\n" ) if ( main::VERBOSE );
$task_list = $monitor->{"ON_list"}; $task_list = $monitor->{"ON_list"};
} }
elsif ( $state == 0 && $monitor->{LastState} > 0 ) # Come out of alarm state elsif ( $state == 0 && $monitor->{LastState} > 0 ) # Come out of alarm state
{ {
print( "Applying OFF_list\n" ) if ( VERBOSE ); print( "Applying OFF_list\n" ) if ( main::VERBOSE );
$task_list = $monitor->{"OFF_list"}; $task_list = $monitor->{"OFF_list"};
} }
if ( $task_list ) if ( $task_list )
@ -356,7 +356,7 @@ sub addToDeviceList
my $function = shift; my $function = shift;
my $limit = shift; my $limit = shift;
print( "Adding to device list, uc:$unit_code, ev:$event, mo:$monitor, fu:$function, li:$limit\n" ) if ( VERBOSE ); print( "Adding to device list, uc:$unit_code, ev:$event, mo:$monitor, fu:$function, li:$limit\n" ) if ( main::VERBOSE );
my $device = $device_hash{$unit_code}; my $device = $device_hash{$unit_code};
if ( !$device ) if ( !$device )
{ {
@ -385,7 +385,7 @@ sub addToMonitorList
my $function = shift; my $function = shift;
my $limit = shift; my $limit = shift;
print( "Adding to monitor list, uc:$unit_code, ev:$event, mo:$monitor, fu:$function, li:$limit\n" ) if ( VERBOSE ); print( "Adding to monitor list, uc:$unit_code, ev:$event, mo:$monitor, fu:$function, li:$limit\n" ) if ( main::VERBOSE );
my $device = $device_hash{$unit_code}; my $device = $device_hash{$unit_code};
if ( !$device ) if ( !$device )
{ {
@ -410,7 +410,7 @@ sub loadTasks
{ {
%monitor_hash = (); %monitor_hash = ();
print( "Loading tasks\n" ) if ( VERBOSE ); print( "Loading tasks\n" ) if ( main::VERBOSE );
# Clear out all old device task lists # Clear out all old device task lists
foreach my $unit_code ( sort( keys(%device_hash) ) ) foreach my $unit_code ( sort( keys(%device_hash) ) )
{ {
@ -438,7 +438,7 @@ sub loadTasks
if ( $monitor->{Function} eq 'X10' && $monitor->{X10Activation} ) if ( $monitor->{Function} eq 'X10' && $monitor->{X10Activation} )
{ {
print( "$monitor->{Name} has active string '$monitor->{X10Activation}'\n" ) if ( VERBOSE ); print( "$monitor->{Name} has active string '$monitor->{X10Activation}'\n" ) if ( main::VERBOSE );
foreach my $code_string ( split( ',', $monitor->{X10Activation} ) ) foreach my $code_string ( split( ',', $monitor->{X10Activation} ) )
{ {
#print( "Code string: $code_string\n" ); #print( "Code string: $code_string\n" );
@ -459,7 +459,7 @@ sub loadTasks
} }
if ( $monitor->{X10AlarmInput} ) if ( $monitor->{X10AlarmInput} )
{ {
print( "$monitor->{Name} has alarm input string '$monitor->{X10AlarmInput}'\n" ) if ( VERBOSE ); print( "$monitor->{Name} has alarm input string '$monitor->{X10AlarmInput}'\n" ) if ( main::VERBOSE );
foreach my $code_string ( split( ',', $monitor->{X10AlarmInput} ) ) foreach my $code_string ( split( ',', $monitor->{X10AlarmInput} ) )
{ {
#print( "Code string: $code_string\n" ); #print( "Code string: $code_string\n" );
@ -480,7 +480,7 @@ sub loadTasks
} }
if ( $monitor->{X10AlarmOutput} ) if ( $monitor->{X10AlarmOutput} )
{ {
print( "$monitor->{Name} has alarm output string '$monitor->{X10AlarmOutput}'\n" ) if ( VERBOSE ); print( "$monitor->{Name} has alarm output string '$monitor->{X10AlarmOutput}'\n" ) if ( main::VERBOSE );
foreach my $code_string ( split( ',', $monitor->{X10AlarmOutput} ) ) foreach my $code_string ( split( ',', $monitor->{X10AlarmOutput} ) )
{ {
#print( "Code string: $code_string\n" ); #print( "Code string: $code_string\n" );