Skip to content

Commit

Permalink
Fix discovery protocols again
Browse files Browse the repository at this point in the history
earlier fix had a typo

fixes librenms#15432
  • Loading branch information
murrant committed Oct 11, 2023
1 parent c87c6e8 commit c9b9ad7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/discovery/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* See COPYING for more details.
*/

use App\Actions\Device\ValidateDeviceAndCreate;
use App\Models\Device;
use App\Models\Eventlog;
use App\Models\Ipv6Address;
use App\Models\Ipv6Network;
Expand Down Expand Up @@ -87,11 +89,11 @@ function discover_new_device($hostname, $device, $method, $interface = null)
}

try {
$remote_device = new \App\Models\Device([
$remote_device = new Device([
'hostname' => $hostname,
'poller_group' => $device['poller_group'],
]);
$result = \App\Actions\Device\ValidateDeviceAndCreate($remote_device)->execute();
$result = (new ValidateDeviceAndCreate($remote_device))->execute();

if ($result) {
echo '+[' . $remote_device->hostname . '(' . $remote_device->device_id . ')]';
Expand Down

0 comments on commit c9b9ad7

Please sign in to comment.