fix: inconsistent device discovery (#6518)

There were two or more separate $device arrays during discovery. When one was updated, others were not.
Combine those all.
Make sure the new os is loaded if the os changed.
This commit is contained in:
Tony Murray
2017-04-28 16:50:00 -05:00
committed by Neil Lathwood
parent 0211c5864b
commit 374a4041af
3 changed files with 8 additions and 2 deletions

View File

@@ -121,6 +121,7 @@ if (!empty($config['distributed_poller_group'])) {
$where .= ' AND poller_group IN('.$config['distributed_poller_group'].')';
}
global $device;
foreach (dbFetch("SELECT * FROM `devices` WHERE status = 1 AND disabled = 0 $where ORDER BY device_id DESC", $sqlparams) as $device) {
discover_device($device, $options);
}