From e72c357fd0440bdd2e4d7b521a20a395dd37dd18 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 23 May 2020 16:13:48 -0400 Subject: [PATCH] Unable to probe should not be fatal --- web/skins/classic/views/onvifprobe.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/views/onvifprobe.php b/web/skins/classic/views/onvifprobe.php index 6f1f2af80..95e1abeba 100644 --- a/web/skins/classic/views/onvifprobe.php +++ b/web/skins/classic/views/onvifprobe.php @@ -36,9 +36,10 @@ function execONVIF($cmd) { if ( $status ) { $html_output = implode('
', $output); - ZM\Fatal("Unable to probe network cameras, status is '$status'. Output was:

- $html_output

- Please the following command from a command line for more information:

$shell_command" + ZM\Error("Unable to probe network cameras, status is '$status'. Output was: + $html_output + Please run the following command from a command line for more information: + $shell_command" ); } else { ZM\Logger::Debug('Results from probe: '.implode('
', $output)); @@ -49,7 +50,8 @@ function execONVIF($cmd) { function probeCameras($localIp) { $cameras = array(); - if ( $lines = @execONVIF('probe 1.1,1.2'.(isset($_REQUEST['interface']) ? isset($_REQUEST['interface'] : '' )) ) { + $lines = @execONVIF('probe 1.1,1.2'.(isset($_REQUEST['interface']) ? ' '.isset($_REQUEST['interface']) : '' )); + if ( $lines ) { foreach ( $lines as $line ) { $line = rtrim($line); if ( preg_match('|^(.+),(.+),\s\((.*)\)$|', $line, $matches) ) {