mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-08-07 02:32:32 -04:00
Midly improve dlink support. Fix for probing an undefined array
This commit is contained in:
1 parent
0afa383c38
commit
00bd2259a3
1 file changed
+7
-4
@@ -531,18 +531,20 @@ function probeFoscam($ip, $username, $password) {
|
||||
}
|
||||
|
||||
function probeDLinkInternational($ip, $username, $password) {
|
||||
if ($username === null) $username = 'root';
|
||||
if ($username === null) $username = 'admin';
|
||||
if ($password === null) $password = '';
|
||||
$cameras = [];
|
||||
$camera = array(
|
||||
'ip' => $ip,
|
||||
'Name' => 'DLink Camera',
|
||||
'Name' => 'D-Link Camera',
|
||||
'Manufacturer' => 'D-Link',
|
||||
'mjpegstream' => 'http://'.$username.':'.$password.'@'.$ip.'/video.cgi',
|
||||
'mjpegstream' => 'http://'.$username.':'.$password.'@'.$ip.'/image/jpeg.cgi',
|
||||
'monitor' => array(
|
||||
'Manufacturer' => 'D-Link',
|
||||
'Type' => 'Ffmpeg',
|
||||
'Path' => 'http://'.$ip.'/video.cgi',
|
||||
'Path' => 'rtsp://'.$username.':'.$password.'@'.$ip.'/live1.sdp',
|
||||
'User' => $username,
|
||||
'Pass' => $password,
|
||||
'Host' => $ip,
|
||||
'Width' => 640,
|
||||
'Height' => 480,
|
||||
@@ -844,6 +846,7 @@ function probeNetwork() {
|
||||
continue;
|
||||
}
|
||||
$macRoot = str_replace(':', '', substr($mac, 0, 8));
|
||||
if (!isset($cameras[$mac])) $cameras[$mac] = [];
|
||||
#ZM\Debug("Got $macRoot from $mac");
|
||||
if (isset($macBases[$macRoot])) {
|
||||
ZM\Debug("Have match for $macRoot $ip ".$macBases[$macRoot]['type']);
|
||||
|
||||
Reference in new issue
Block a user