Bug 209 - Optional prevent ongoing alarms from keeping events open.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1608 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
c345eb0706
commit
76252c4831
|
@ -689,21 +689,28 @@ bool Monitor::Analyse()
|
|||
{
|
||||
if ( event )
|
||||
{
|
||||
if ( state == IDLE || state == TAPE )
|
||||
int section_mod = timestamp->tv_sec%section_length;
|
||||
if ( section_mod < last_section_mod )
|
||||
{
|
||||
int section_mod = timestamp->tv_sec%section_length;
|
||||
if ( section_mod < last_section_mod )
|
||||
if ( state == IDLE || state == TAPE || config.force_close_events )
|
||||
{
|
||||
Info(( "Ended event" ));
|
||||
if ( state == IDLE || state == TAPE )
|
||||
{
|
||||
Info(( "Ended event" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
Info(( "Force closed event" ));
|
||||
}
|
||||
gettimeofday( &(event->EndTime()), &dummy_tz );
|
||||
delete event;
|
||||
event = 0;
|
||||
last_section_mod = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
last_section_mod = section_mod;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
last_section_mod = section_mod;
|
||||
}
|
||||
}
|
||||
if ( !event )
|
||||
|
|
|
@ -1108,6 +1108,14 @@ my @options =
|
|||
type => { db_type=>'string', hint=>'asc|desc', pattern=>qr|^([ad])|i, format=>q( $1 =~ /^a/i ? 'asc' : 'desc' ) },
|
||||
category => 'system',
|
||||
},
|
||||
{
|
||||
name => "ZM_FORCE_CLOSE_EVENTS",
|
||||
default => "no",
|
||||
description => "Whether events are closed at section ends.",
|
||||
help => "When a monitor is running in a continuous recording moe (Record or Mocord) events are usually closed after a fixed period of time (the section length). However in Mocord mode it is possible that motion detection may occur near the end of a section and ordinarily this will prevent the event being closed until the motion has ceased. Switching this option on will force the event closed at the specified time regardless of any motion activity.",
|
||||
type => $types{boolean},
|
||||
category => 'system',
|
||||
},
|
||||
{
|
||||
name => "ZM_CHECK_FOR_UPDATES",
|
||||
default => "yes",
|
||||
|
|
Loading…
Reference in New Issue