From aba387f20255cbc8766056d793899c3cafb9a5fa Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 14 Jan 2022 16:31:52 -0500 Subject: [PATCH] Fix !== which should be >= --- 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 96d082f71..18f72f6b3 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2154,7 +2154,7 @@ bool Monitor::Analyse() { if (event) { if (noteSetMap.size() > 0) event->updateNotes(noteSetMap); - if (section_length != Seconds(min_section_length) && (event->Duration() >= section_length)) { + if (section_length >= Seconds(min_section_length) && (event->Duration() >= section_length)) { Warning("%s: %03d - event %" PRIu64 ", has exceeded desired section length. %" PRIi64 " - %" PRIi64 " = %" PRIi64 " >= %" PRIi64, name.c_str(), analysis_image_count, event->Id(), static_cast(std::chrono::duration_cast(snap->timestamp.time_since_epoch()).count()), @@ -2180,7 +2180,7 @@ bool Monitor::Analyse() { if (event) { Debug(2, "Have event %" PRIu64 " in record", event->Id()); - if (section_length != Seconds(min_section_length) && (event->Duration() >= section_length) + if (section_length >= Seconds(min_section_length) && (event->Duration() >= section_length) && ((function == MOCORD && event_close_mode != CLOSE_TIME) || (function == RECORD && event_close_mode == CLOSE_TIME) || std::chrono::duration_cast(snap->timestamp.time_since_epoch()) % section_length == Seconds(0))) {