From f04383e8df8b330c40564ed54ec5a0dccc978693 Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Tue, 19 Dec 2023 12:06:57 +0100 Subject: [PATCH] fix: Fix netscan task fails to submit remote inventories with JSON protocol --- Changes | 1 + lib/GLPI/Agent/HTTP/Server/ToolBox/Inventory.pm | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index b845671dd..c44c859fe 100644 --- a/Changes +++ b/Changes @@ -53,6 +53,7 @@ toolbox: * fix #533: Fix Toolbox export buttons in inventory results * Fix wrong remote inventory results when using a short timeout for quickier detection * Handle agent folder as vardir folder when agent is running as a service +* Fix netscan task fails to submit remote inventories with JSON protocol injector: * fix #537: Make -x, --xml-ua & --json-ua options equivalent and update help text diff --git a/lib/GLPI/Agent/HTTP/Server/ToolBox/Inventory.pm b/lib/GLPI/Agent/HTTP/Server/ToolBox/Inventory.pm index d902f26f0..0f73228a2 100644 --- a/lib/GLPI/Agent/HTTP/Server/ToolBox/Inventory.pm +++ b/lib/GLPI/Agent/HTTP/Server/ToolBox/Inventory.pm @@ -881,11 +881,12 @@ sub netscan { # Create an NetDiscovery task my $netdisco = GLPI::Agent::Task::NetDiscovery->new( - config => $agent->{config}, - datadir => $agent->{datadir}, - logger => $logger, - target => $target, - deviceid => $agent->{deviceid}, + config => $agent->{config}, + datadir => $agent->{datadir}, + logger => $logger, + target => $target, + deviceid => $agent->{deviceid}, + agentid => $agent->{agentid}, ); # Compute ranges