zoneminder/tests
Ben Dailey 2dc48e4335 feat: add per-topic alarm expiry using PullMessagesResponse TerminationTime
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>
2026-01-27 05:52:31 -05:00
..
data/fonts ZmFont: Store character padding in font file 2021-04-25 23:13:21 +02:00
CMakeLists.txt Implement ONVIF subscription renewal optimization with time tracking 2026-01-09 19:36:34 +00:00
main.cpp Update to Catch2 v3 2024-05-08 14:16:05 -04:00
zm_box.cpp Box: Make range calculations mathematically correct 2021-05-16 19:41:45 +02:00
zm_catch2.h Update to Catch2 v3 2024-05-08 14:16:05 -04:00
zm_comms.cpp Misc: Rename namespace ZM to zm 2021-06-06 19:11:11 +02:00
zm_crypt.cpp Crypto: Implement SHA1 hashing 2021-05-30 22:56:21 +02:00
zm_font.cpp tests/Font: Avoid lambda capture initialization 2021-05-24 00:55:46 +02:00
zm_onvif_renewal.cpp feat: add per-topic alarm expiry using PullMessagesResponse TerminationTime 2026-01-27 05:52:31 -05:00
zm_poly.cpp Polygon: Perform clip operation on existing object instead of returning a new clipped one 2021-05-16 19:42:41 +02:00
zm_utils.cpp Rough in remove_password function + tests 2022-07-04 09:53:50 -04:00
zm_vector2.cpp Polygon: Implement clipping to a boundary box 2021-05-16 19:41:45 +02:00