mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-06-04 03:45:53 -04:00
Pass 'MonitorId' in the returned array, since the private method does not pass the monitor ID. (monitor_probe.php)
This commit is contained in:
@@ -126,7 +126,7 @@ function probeV4L() {
|
||||
} # end function probeV4L
|
||||
|
||||
function probeAxisCommunicationsAB($ip, $username, $password) {
|
||||
return probeAxis($ip, $username, $password);
|
||||
return probeAxis($ip, $username, $password);
|
||||
}
|
||||
|
||||
// Probe Network Cameras
|
||||
@@ -167,7 +167,7 @@ function probeAxis($ip, $username, $password) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ZM\Debug("No content from $url");
|
||||
ZM\Debug("No content from $url");
|
||||
}
|
||||
$cameras[] = $camera;
|
||||
return $cameras;
|
||||
@@ -610,12 +610,12 @@ function probeFoscam($ip, $username, $password) {
|
||||
$rtsp_port = 0;
|
||||
$http_port = 0;
|
||||
if (port_open($ip, 554)) {
|
||||
$rtsp_port = 554;
|
||||
$rtsp_port = 554;
|
||||
}
|
||||
if (port_open($ip, 88)) {
|
||||
$http_port = 88;
|
||||
$http_port = 88;
|
||||
} else if (port_open($ip, 80)) {
|
||||
$http_port = 80;
|
||||
$http_port = 80;
|
||||
}
|
||||
if (!$rtsp_port) $rtsp_port = $http_port;
|
||||
$cameras = [];
|
||||
@@ -921,14 +921,14 @@ function probeNetwork() {
|
||||
ZM\Debug("Have match for $ip $mac $macRoot ".$macBases[$macRoot]['type']);
|
||||
$macBase = $macBases[$macRoot];
|
||||
if ($filter_manufacturer and ($filter_manufacturer != $macBase['type'])) {
|
||||
ZM\Debug("Continuing because offilter $filter_manufacturer == ".$macBase['type']);
|
||||
continue;
|
||||
ZM\Debug("Continuing because offilter $filter_manufacturer == ".$macBase['type']);
|
||||
continue;
|
||||
} else {
|
||||
ZM\Debug("Not Continuing because offilter $filter_manufacturer != ".$macBase['type']);
|
||||
ZM\Debug("Not Continuing because offilter $filter_manufacturer != ".$macBase['type']);
|
||||
}
|
||||
if (function_exists('probe'.$macBase['type'])) {
|
||||
if (!$username and isset($monitors[$ip])) {
|
||||
$monitor = $monitors[$ip];
|
||||
$monitor = $monitors[$ip];
|
||||
ZM\Debug("Using auth from monitor $ip ".$monitor->User().' '. $monitor->Pass());
|
||||
$new_cameras = call_user_func('probe'.$macBase['type'], $ip, $monitors[$ip]->User(), $monitors[$ip]->Pass());
|
||||
if (!$new_cameras) {
|
||||
@@ -1023,12 +1023,13 @@ function probeNetwork() {
|
||||
}
|
||||
|
||||
$results[] = [
|
||||
'mac' => $mac,
|
||||
'mac' => $mac,
|
||||
'description' => $sourceString,
|
||||
'url' => (isset($camera['monitor']) ? $camera['monitor']['Path'] : ''),
|
||||
'IP' => $camera['ip'],
|
||||
'camera' => $camera,
|
||||
'Monitor' => $monitor,
|
||||
'MonitorId' => ($monitor) ? $monitor->Id() : '',
|
||||
];
|
||||
} # end foreach stream
|
||||
} # end foreach mac
|
||||
|
||||
Reference in New Issue
Block a user