Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
This commit is contained in:
commit
5d8b915c2b
|
@ -363,7 +363,7 @@ MAIN: while( $loop ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $$Storage{Scheme} ) {
|
if ( ! $$Storage{Scheme} ) {
|
||||||
Debug("Storage Scheme not set on $$Storage{Name}");
|
Error("Storage Scheme not set on $$Storage{Name}");
|
||||||
if ( ! chdir( $monitor_dir ) ) {
|
if ( ! chdir( $monitor_dir ) ) {
|
||||||
Error( "Can't chdir directory '$$Storage{Path}/$monitor_dir': $!" );
|
Error( "Can't chdir directory '$$Storage{Path}/$monitor_dir': $!" );
|
||||||
next;
|
next;
|
||||||
|
@ -477,6 +477,10 @@ MAIN: while( $loop ) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
Debug("Event $db_event is not in fs. Should have been at ".$Event->Path());
|
Debug("Event $db_event is not in fs. Should have been at ".$Event->Path());
|
||||||
|
if ( $Event->Archived() ) {
|
||||||
|
Warning("Event $$Event{Id} is Archived. Taking no further action on it.");
|
||||||
|
next;
|
||||||
|
}
|
||||||
if ( ! $Event->StartTime() ) {
|
if ( ! $Event->StartTime() ) {
|
||||||
Info("Event $$Event{Id} has no start time. deleting it.");
|
Info("Event $$Event{Id} has no start time. deleting it.");
|
||||||
if ( confirm() ) {
|
if ( confirm() ) {
|
||||||
|
|
|
@ -14,9 +14,17 @@ $| = 1;
|
||||||
|
|
||||||
my @monitors;
|
my @monitors;
|
||||||
my $dbh = zmDbConnect();
|
my $dbh = zmDbConnect();
|
||||||
my $sql = "SELECT * FROM Monitors";
|
|
||||||
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
|
my $sql = "SELECT * FROM Monitors
|
||||||
my $res = $sth->execute() or die( "Can't execute '$sql': ".$sth->errstr() );
|
WHERE find_in_set( Function, 'Modect,Mocord,Nodect' )".
|
||||||
|
( $Config{ZM_SERVER_ID} ? 'AND ServerId=?' : '' )
|
||||||
|
;
|
||||||
|
|
||||||
|
my $sth = $dbh->prepare_cached( $sql )
|
||||||
|
or die( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||||
|
|
||||||
|
my $res = $sth->execute()
|
||||||
|
or die( "Can't execute '$sql': ".$sth->errstr() );
|
||||||
|
|
||||||
while ( my $monitor = $sth->fetchrow_hashref() ) {
|
while ( my $monitor = $sth->fetchrow_hashref() ) {
|
||||||
push( @monitors, $monitor );
|
push( @monitors, $monitor );
|
||||||
|
@ -24,6 +32,12 @@ while ( my $monitor = $sth->fetchrow_hashref() ) {
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
foreach my $monitor (@monitors) {
|
foreach my $monitor (@monitors) {
|
||||||
|
# Check shared memory ok
|
||||||
|
if ( !zmMemVerify( $monitor ) ) {
|
||||||
|
zmMemInvalidate( $monitor );
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
my $monitorState = zmGetMonitorState($monitor);
|
my $monitorState = zmGetMonitorState($monitor);
|
||||||
printState($monitor->{Id}, $monitor->{Name}, $monitorState);
|
printState($monitor->{Id}, $monitor->{Name}, $monitorState);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue