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> |
||
|---|---|---|
| .. | ||
| data/fonts | ||
| CMakeLists.txt | ||
| main.cpp | ||
| zm_box.cpp | ||
| zm_catch2.h | ||
| zm_comms.cpp | ||
| zm_crypt.cpp | ||
| zm_font.cpp | ||
| zm_onvif_renewal.cpp | ||
| zm_poly.cpp | ||
| zm_utils.cpp | ||
| zm_vector2.cpp | ||