mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-25 09:11:53 -04:00
Cameras like Reolink send alarm=true but never send the corresponding false, causing alarms to stick indefinitely. Use the TerminationTime from PullMessagesResponse to auto-expire stale per-topic alarms. - Add AlarmEntry struct with value and termination_time fields - Extract TerminationTime from each PullMessagesResponse and attach it to alarm entries; refresh on re-trigger so active alarms persist - Sweep expired alarms after processing messages and on poll timeout - Add expire_alarms option (default: true) to disable via onvif_options - Fix TOCTOU race: remove unsynchronized alarms.empty() check before acquiring mutex in the timeout sweep path - Simplify SetNoteSet with C++17 structured bindings - Add Catch2 tests for alarm expiry logic (mirrored struct to avoid gSOAP header dependency) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>