diff --git a/db/zm_update-1.37.22.sql b/db/zm_update-1.37.22.sql index 0a1c457dc..ae23ff9a4 100644 --- a/db/zm_update-1.37.22.sql +++ b/db/zm_update-1.37.22.sql @@ -1,18 +1,25 @@ -- --- Update Monitors table to have a MQTT_Enabled Column +-- This adds the Reports Table -- -SELECT 'Checking for `Janus_RTSP_User` in Monitors'; SET @s = (SELECT IF( - (SELECT COUNT(*) - FROM INFORMATION_SCHEMA.COLUMNS - WHERE table_name = 'Monitors' - AND table_schema = DATABASE() - AND column_name = 'Janus_RTSP_User' - ) > 0, -"SELECT 'Column Janus_RTSP_User already exists in Monitors'", -"ALTER TABLE Monitors ADD COLUMN `Janus_RTSP_User` INT(10) AFTER `Janus_Use_RTSP_Restream`" -)); + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Reports' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Reports table exists'", + " +CREATE TABLE Reports ( + Id INT(10) UNSIGNED auto_increment, + Name varchar(30), + FilterId int(10) UNSIGNED, + `StartDateTime` datetime default NULL, + `EndDateTime` datetime default NULL, + `Interval` INT(10) UNSIGNED, + PRIMARY KEY(Id) +) ENGINE=InnoDB;" + )); PREPARE stmt FROM @s; EXECUTE stmt; diff --git a/db/zm_update-1.37.23.sql b/db/zm_update-1.37.23.sql new file mode 100644 index 000000000..ba22f01fe --- /dev/null +++ b/db/zm_update-1.37.23.sql @@ -0,0 +1,18 @@ +-- +-- Update Monitors table to have a Janus_RTSP_User Column +-- + +SELECT 'Checking for `Janus_RTSP_User` in Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'Janus_RTSP_User' + ) > 0, +"SELECT 'Column Janus_RTSP_User already exists in Monitors'", +"ALTER TABLE Monitors ADD COLUMN `Janus_RTSP_User` INT(10) AFTER `Janus_Use_RTSP_Restream`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in index f1c5972c9..78c374159 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/Memory.pm.in @@ -275,7 +275,7 @@ sub zmMemVerify { } $valid = zmMemRead($monitor, 'shared_data:valid', 1); if (!$valid) { - Error("Shared data not valid for monitor $$monitor{Id}"); + Debug(1, "Shared data not valid for monitor $$monitor{Id}"); return undef; } } else { diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Memory/Mapped.pm b/scripts/ZoneMinder/lib/ZoneMinder/Memory/Mapped.pm index d76bbae9a..8bcece8c8 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Memory/Mapped.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Memory/Mapped.pm @@ -87,7 +87,7 @@ sub zmMemAttach { my $mmap_file = $Config{ZM_PATH_MAP}.'/zm.mmap.'.$monitor->{Id}; if ( ! -e $mmap_file ) { - Error("Memory map file '$mmap_file' does not exist in zmMemAttach. zmc might not be running."); + Debug(1, "Memory map file '$mmap_file' does not exist in zmMemAttach. zmc might not be running."); return undef; } my $mmap_file_size = -s $mmap_file; diff --git a/src/zm_eventstream.cpp b/src/zm_eventstream.cpp index fdbd5c681..87d19eeb8 100644 --- a/src/zm_eventstream.cpp +++ b/src/zm_eventstream.cpp @@ -1070,6 +1070,7 @@ void EventStream::runStream() { ); } else { Debug(1, "invalid curr_frame_id %d !< %d", curr_frame_id, event_data->frame_count); + curr_frame_id = event_data->frame_count; } // end if not at end of event } else { // Paused diff --git a/src/zm_packetqueue.cpp b/src/zm_packetqueue.cpp index 12238fb07..c40bfbb73 100644 --- a/src/zm_packetqueue.cpp +++ b/src/zm_packetqueue.cpp @@ -345,7 +345,6 @@ void PacketQueue::clearPackets(const std::shared_ptr &add_packet) { ++it; } // end while - Debug(1, "Resulting it pointing at latest packet? %d, next front points to begin? %d, Keyframe interval %d", ( *it == add_packet ), ( next_front == pktQueue.begin() ), diff --git a/version b/version index 6c93bc8f7..f7abe5680 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.37.21 +1.37.22 diff --git a/web/ajax/modals/logout.php b/web/ajax/modals/logout.php index c9df1a586..72958079f 100644 --- a/web/ajax/modals/logout.php +++ b/web/ajax/modals/logout.php @@ -19,7 +19,7 @@ // global $CLANG; ?> -