spacing and quotes, but the main change is using aud_print instead of Info

This commit is contained in:
Isaac Connor 2019-05-06 10:04:53 -04:00
parent 4ecf41f2b4
commit f0e5a435cf
1 changed files with 32 additions and 32 deletions

View File

@ -488,8 +488,8 @@ MAIN: while( $loop ) {
my $monitor_links;
foreach my $link ( glob('*') ) {
next if ( !-l $link );
next if ( -e $link );
next if !-l $link;
next if -e $link;
aud_print("Filesystem monitor link '$link' does not point to valid monitor directory");
if ( confirm() ) {
@ -498,11 +498,11 @@ MAIN: while( $loop ) {
executeShellCommand($command);
$cleaned = 1;
}
}
} # end foreach monitor link
} # end foreach Storage Area
if ( $cleaned ) {
Debug("Events were deleted, starting again.");
Debug('Events were deleted, starting again.');
redo MAIN;
}
@ -560,7 +560,7 @@ EVENT: while ( my ( $db_event, $age ) = each( %$db_events ) ) {
next;
}
if ( !$Event->StartTime() ) {
Info("Event $$Event{Id} has no start time.");
aud_print("Event $$Event{Id} has no start time.");
if ( confirm() ) {
$Event->delete();
$cleaned = 1;
@ -569,7 +569,7 @@ EVENT: while ( my ( $db_event, $age ) = each( %$db_events ) ) {
}
if ( ! $Event->EndTime() ) {
if ( $age > $Config{ZM_AUDIT_MIN_AGE} ) {
Info("Event $$Event{Id} has no end time and is $age seconds old. deleting it.");
aud_print("Event $$Event{Id} has no end time and is $age seconds old. Deleting it.");
if ( confirm() ) {
$Event->delete();
$cleaned = 1;
@ -587,14 +587,14 @@ EVENT: while ( my ( $db_event, $age ) = each( %$db_events ) ) {
$cleaned = 1;
}
} else {
aud_print( "Database event '".$Event->Path()." monitor:$db_monitor event:$db_event' does not exist in filesystem but too young to delete age: $age > MIN $Config{ZM_AUDIT_MIN_AGE}.\n" );
aud_print("Database event '".$Event->Path()." monitor:$db_monitor event:$db_event' does not exist in filesystem but too young to delete age: $age > MIN $Config{ZM_AUDIT_MIN_AGE}.");
}
} # end if exists in filesystem
} else {
Debug("Found fs event for id $db_event, $age seconds old at " . $$fs_events{$db_event}->Path());
my $Event = ZoneMinder::Event->find_one( Id=>$db_event );
if ( $Event and ! $Event->check_for_in_filesystem() ) {
Warning("Not found at " . $Event->Path() . ' was found at ' . $$fs_events{$db_event}->Path() );
Warning('Not found at ' . $Event->Path() . ' was found at ' . $$fs_events{$db_event}->Path());
Warning($Event->to_string());
Warning($$fs_events{$db_event}->to_string());
$$Event{Scheme} = '' if ! defined $$Event{Scheme};
@ -622,7 +622,7 @@ EVENT: while ( my ( $db_event, $age ) = each( %$db_events ) ) {
} # foreach db_event
} # end foreach db_monitor
if ( $cleaned ) {
Debug("Have done some cleaning, restarting.");
Debug('Have done some cleaning, restarting.');
redo MAIN;
}
@ -952,7 +952,7 @@ sub confirm {
}
$yesno = 1;
}
return( $yesno );
return $yesno;
}
sub deleteSwapImage {