Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nall-chan committed Aug 2, 2023
1 parent a0b38c3 commit 158c2a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ONVIF Discovery/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ protected function GetConfigurationValues()
$IO = IPS_GetInstance($InstanceIDConfigurator)['ConnectionID'];
if ($IO > 0) {
$DevicesAddress[$InstanceIDConfigurator] = str_replace('/onvif/device_service', '', IPS_GetProperty($IO, 'Address'));
$DevicesAddress[$InstanceIDConfigurator] = str_replace(':80', '', $DevicesAddress[$InstanceIDConfigurator]);
if (strpos($DevicesAddress[$InstanceIDConfigurator], ':80', -3)) {
$DevicesAddress[$InstanceIDConfigurator] = substr($DevicesAddress[$InstanceIDConfigurator], 0, -3);
}
}
}
$Devices = $this->Devices;
Expand Down Expand Up @@ -452,7 +454,9 @@ protected static function getProbeMatchXAddrs($xmlDOMDoc, $ip)
array_walk($filtermatches, function (&$item)
{
$item = str_replace('/onvif/device_service', '', $item);
$item = str_replace(':80', '', $item);
if (strpos($item, ':80', -3)) {
$item = substr($item, 0, -3);
}
});
return $filtermatches;
}
Expand Down

0 comments on commit 158c2a6

Please sign in to comment.