Skip to content

Commit

Permalink
If shm size is 0 don't log an error
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Oct 4, 2024
1 parent 3d3ece3 commit 6e1e077
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,16 @@ sub zmMemVerify {

my $sd_size = zmMemRead($monitor, 'shared_data:size', 1);
if ($sd_size != $mem_data{shared_data}->{size}) {
Error('Shared data size conflict in shared_data for monitor '
.$monitor->{Name}.', expected '.$mem_data{shared_data}->{size}
.', got '.$sd_size);
if ($mem_data{shared_data}->{size}) {
Error('Shared data size conflict in shared_data for monitor '
.$monitor->{Name}.', expected '.$mem_data{shared_data}->{size}
.', got '.$sd_size);
} else {
# Means it may be starting up/reloading, not really an error
Debug('Shared data size conflict in shared_data for monitor '
.$monitor->{Name}.', expected '.$mem_data{shared_data}->{size}
.', got '.$sd_size);
}
return undef;
} else {
Debug(4, 'Shared data size match for monitor '.$monitor->{Name}
Expand Down

0 comments on commit 6e1e077

Please sign in to comment.