mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-23 13:09:23 -04:00
zmwatch only gated the camera reboot attempt on CanReboot(), so it called $control->open() even when the camera was unreachable - the common reason a monitor has no image since startup - and blocked until the connection timed out, logging an error each pass. Add a ping check before open(). Move the host resolution into Control so callers don't have to dig the ip out of the Path: add Control::host(), which returns the cached host or derives it from the monitor's ControlAddress/Path via the shared guess_credentials() (parsing only, no network i/o), and have ping() fall back to it. ping() still accepts an explicit ip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>