From 67f4359242f93e22c7263c07a8efabc2b9e3743e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 11 Jan 2021 10:06:54 -0500 Subject: [PATCH] clean up code giving warning when no starttime is given --- src/zm_event.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 7c574d896..1a766431f 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -74,20 +74,18 @@ Event::Event( //scheme save_jpegs(0) { - std::string notes; createNotes(notes); struct timeval now; gettimeofday(&now, 0); - bool untimedEvent = false; if ( !start_time.tv_sec ) { - untimedEvent = true; + Warning("Event has zero time, setting to now"); start_time = now; } else if ( start_time.tv_sec > now.tv_sec ) { Error( - "StartDateTime in the future %u.%u > %u.%u", + "StartDateTime in the future starttime %u.%u >? now %u.%u", start_time.tv_sec, start_time.tv_usec, now.tv_sec, now.tv_usec ); start_time = now; @@ -190,9 +188,6 @@ Event::Event( Debug(1, "Using storage area at %s", path.c_str()); db_mutex.unlock(); - if ( untimedEvent ) { - Warning("Event %" PRIu64 " has zero time, setting to current", id); - } video_name = ""; snapshot_file = path + "/snapshot.jpg";