From 7653a058a372abef93d15c656a5070bb83f24dba Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 20 Nov 2020 16:31:40 -0500 Subject: [PATCH] More correct code for setting source --- src/zms.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zms.cpp b/src/zms.cpp index 4e77ea4c1..38917a388 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -118,9 +118,13 @@ int main(int argc, const char *argv[], char **envp) { if ( !value ) value = ""; if ( !strcmp(name, "source") ) { - source = !strcmp(value, "event")?ZMS_EVENT:ZMS_MONITOR; - if ( !strcmp(value, "fifo") ) + if ( !strcmp(value, "event") ) { + source = ZMS_EVENT; + } else if ( !strcmp(value, "fifo") ) { source = ZMS_FIFO; + } else { + source = ZMS_MONITOR; + } } else if ( !strcmp(name, "mode") ) { mode = !strcmp(value, "jpeg")?ZMS_JPEG:ZMS_MPEG; mode = !strcmp(value, "raw")?ZMS_RAW:mode; @@ -329,6 +333,7 @@ int main(int argc, const char *argv[], char **envp) { Error("Neither a monitor or event was specified."); } // end if monitor or event + Debug(1, "Terminating"); logTerm(); zmDbClose();