Fix case of recording events when Recording==NONE

This commit is contained in:
Isaac Connor 2022-02-28 12:10:14 -05:00
parent e31b18a1a6
commit 980aaa5942
1 changed files with 2 additions and 2 deletions

View File

@ -2088,7 +2088,7 @@ bool Monitor::Analyse() {
closeEvent(); closeEvent();
event = openEvent(snap, cause, noteSetMap); event = openEvent(snap, cause, noteSetMap);
} }
} else { } else if (recording != RECORDING_NONE) {
if (!event) { if (!event) {
event = openEvent(snap, cause, noteSetMap); event = openEvent(snap, cause, noteSetMap);
Info("%s: %03d - Opening new event %" PRIu64 ", alarm start", name.c_str(), analysis_image_count, event->Id()); Info("%s: %03d - Opening new event %" PRIu64 ", alarm start", name.c_str(), analysis_image_count, event->Id());
@ -2106,7 +2106,7 @@ bool Monitor::Analyse() {
// bulk frame code moved to event. // bulk frame code moved to event.
} // end if state machine } // end if state machine
if (shared_data->recording) { if (shared_data->recording > RECORDING_NONE) {
// If doing record, check to see if we need to close the event or not. // If doing record, check to see if we need to close the event or not.
if (event && (section_length >= Seconds(min_section_length)) && (event->Duration() > section_length)) { if (event && (section_length >= Seconds(min_section_length)) && (event->Duration() > section_length)) {
if ( if (