diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index cecd98d428..6b7070a140 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -97,6 +97,13 @@ function discover_device($device, $options = null) { } } + // Set type to a predefined type for the OS if it's not already set + if ($device['type'] == 'unknown' || $device['type'] == '') { + if ($config['os'][$device['os']]['type']) { + $device['type'] = $config['os'][$device['os']]['type']; + } + } + if ($config['os'][$device['os']]['group']) { $device['os_group'] = $config['os'][$device['os']]['group']; echo ' (' . $device['os_group'] . ')'; @@ -134,13 +141,6 @@ function discover_device($device, $options = null) { register_mibs($device, $devicemib, "includes/discovery/functions.inc.php"); } - // Set type to a predefined type for the OS if it's not already set - if ($device['type'] == 'unknown' || $device['type'] == '') { - if ($config['os'][$device['os']]['type']) { - $device['type'] = $config['os'][$device['os']]['type']; - } - } - $device_end = microtime(true); $device_run = ($device_end - $device_start); $device_time = substr($device_run, 0, 5);