From 0958768ce51a6d41825002130f0e050ca669f3e7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 2 Feb 2021 17:27:35 -0500 Subject: [PATCH] Fix no bulk frames by setting score to -1 which means BULK. It will get changed to 0 or more by later code. Fixes #3121 --- src/zm_monitor.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 4644c7e53..0c66336cd 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1806,8 +1806,8 @@ bool Monitor::Analyse() { // if we have been told to be OFF, then we are off and don't do any processing. if ( trigger_data->trigger_state != TRIGGER_OFF ) { - Debug(4, "Trigger not oFF state is (%d)", trigger_data->trigger_state); - unsigned int score = 0; + Debug(4, "Trigger not OFF state is (%d)", trigger_data->trigger_state); + unsigned int score = -1; // Ready means that we have captured the warmpup # of frames if ( Ready() ) { Debug(4, "Ready"); @@ -2004,7 +2004,7 @@ bool Monitor::Analyse() { } // end if ! event } // end if RECORDING - if ( score ) { + if ( score > 0 ) { if ( (state == IDLE) || (state == TAPE) || (state == PREALARM) ) { // If we should end then previous continuous event and start a new non-continuous event if ( event && event->Frames() @@ -2111,7 +2111,6 @@ bool Monitor::Analyse() { Event::EmptyPreAlarmFrames(); } // end if score or not - // Flag the packet so we don't analyse it again snap->score = score; if ( state == PREALARM ) {