Skip to content

Commit

Permalink
Fix SNMP communication error (wrong tasks id gived) (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lainow authored Jan 7, 2025
1 parent 84b4b8f commit acd390c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/networkinventory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ public function run($jobstate)
$current = $jobstate;
$agent->getFromDB($current->fields['agents_id']);

$ip = $this->getDeviceIPOfTaskID($jobstate->fields['itemtype'], $jobstate->fields['items_id'], $jobstate->fields['plugin_glpiinventory_taskjobs_id']);
$taskjob = new PluginGlpiinventoryTaskjob();
$taskjob->getFromDB($jobstate->fields['plugin_glpiinventory_taskjobs_id']);

$ip = $this->getDeviceIPOfTaskID($jobstate->fields['itemtype'], $jobstate->fields['items_id'], $taskjob->fields['plugin_glpiinventory_tasks_id']);

$param_attrs = [];
$device_attrs = [];
Expand Down

0 comments on commit acd390c

Please sign in to comment.