Move shm Memory debug statements to level 2.
This commit is contained in:
parent
60970673c7
commit
da630f7534
|
@ -306,7 +306,7 @@ sub zmMemVerify {
|
||||||
Error("Shared data not valid for monitor $$monitor{Id}");
|
Error("Shared data not valid for monitor $$monitor{Id}");
|
||||||
return undef;
|
return undef;
|
||||||
} else {
|
} else {
|
||||||
Debug("Shared data appears valid for monitor $$monitor{Id}: $valid");
|
Debug(2, "Shared data appears valid for monitor $$monitor{Id}: $valid");
|
||||||
}
|
}
|
||||||
|
|
||||||
return !undef;
|
return !undef;
|
||||||
|
|
|
@ -81,7 +81,7 @@ sub zmMemAttach {
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
if ( defined($monitor->{MMapAddr}) ) {
|
if ( defined($monitor->{MMapAddr}) ) {
|
||||||
Debug("zmMemAttach already attached at $monitor->{MMapAddr} for $$monitor{Id}");
|
Debug(2, "zmMemAttach already attached at $monitor->{MMapAddr} for $$monitor{Id}");
|
||||||
return !undef;
|
return !undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,11 +168,11 @@ sub zmMemPut {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub zmMemClean {
|
sub zmMemClean {
|
||||||
Debug('Removing memory map files');
|
Debug(2, 'Removing memory map files');
|
||||||
my $mapPath = $Config{ZM_PATH_MAP}.'/zm.mmap.*';
|
my $mapPath = $Config{ZM_PATH_MAP}.'/zm.mmap.*';
|
||||||
foreach my $mapFile( glob( $mapPath ) ) {
|
foreach my $mapFile( glob( $mapPath ) ) {
|
||||||
( $mapFile ) = $mapFile =~ /^(.+)$/;
|
( $mapFile ) = $mapFile =~ /^(.+)$/;
|
||||||
Debug("Removing memory map file '$mapFile'");
|
Debug(2, "Removing memory map file '$mapFile'");
|
||||||
unlink($mapFile);
|
unlink($mapFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,14 +151,14 @@ sub zmMemPut
|
||||||
|
|
||||||
sub zmMemClean
|
sub zmMemClean
|
||||||
{
|
{
|
||||||
Debug( "Removing shared memory\n" );
|
Debug(2, 'Removing shared memory');
|
||||||
# Find ZoneMinder shared memory
|
# Find ZoneMinder shared memory
|
||||||
my $command = "ipcs -m | grep '^"
|
my $command = 'ipcs -m | grep \'^'
|
||||||
.substr( sprintf( "0x%x", hex($Config{ZM_SHM_KEY}) ), 0, -2 )
|
.substr( sprintf( '0x%x', hex($Config{ZM_SHM_KEY}) ), 0, -2 )
|
||||||
."'"
|
.'\''
|
||||||
;
|
;
|
||||||
Debug( "Checking for shared memory with '$command'\n" );
|
Debug(2, 'Checking for shared memory with '.$command);
|
||||||
open( my $CMD, '<', "$command |" )
|
open( my $CMD, '<', $command.' |' )
|
||||||
or Fatal( "Can't execute '$command': $!" );
|
or Fatal( "Can't execute '$command': $!" );
|
||||||
while( <$CMD> )
|
while( <$CMD> )
|
||||||
{
|
{
|
||||||
|
@ -167,8 +167,8 @@ sub zmMemClean
|
||||||
if ( $id =~ /^(\d+)/ )
|
if ( $id =~ /^(\d+)/ )
|
||||||
{
|
{
|
||||||
$id = $1;
|
$id = $1;
|
||||||
$command = "ipcrm shm $id";
|
$command = 'ipcrm shm '.$id;
|
||||||
Debug( "Removing shared memory with '$command'\n" );
|
Debug(2, 'Removing shared memory with '.$command);
|
||||||
qx( $command );
|
qx( $command );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue