From 980aaa5942762bd06f7773f4a834a1dc632cd62f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 28 Feb 2022 12:10:14 -0500 Subject: [PATCH] Fix case of recording events when Recording==NONE --- src/zm_monitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index f1f184fb0..ba11e0121 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2088,7 +2088,7 @@ bool Monitor::Analyse() { closeEvent(); event = openEvent(snap, cause, noteSetMap); } - } else { + } else if (recording != RECORDING_NONE) { if (!event) { event = openEvent(snap, cause, noteSetMap); 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. } // 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 (event && (section_length >= Seconds(min_section_length)) && (event->Duration() > section_length)) { if (