Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(agent): redirect output from FI messages on enrollment
Browse files Browse the repository at this point in the history
  • Loading branch information
DIOHz0r authored and btry committed Jan 12, 2018
1 parent a73a1ed commit 67e5aa4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions inc/agent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,14 @@ protected function enrollByInvitationToken($input) {
$pfAgent = new PluginFusioninventoryAgent();
//var_dump($_SESSION['glpi_plugin_fusioninventory']);
$_SESSION['glpi_fusionionventory_nolock'] = true;
ob_start();
$pfCommunication->handleOCSCommunication('', $inventory, 'glpi');
$fiOutput = ob_get_contents();
if (strlen($fiOutput) != 0) {
// FI print errors to sdt output and agents needs a correct response, let's save this to logs.
$this->logInvitationEvent($invitation, $fiOutput);
}
ob_end_clean();
unset($_SESSION['glpi_fusionionventory_nolock']);
$fiAgentId = $_SESSION['plugin_fusioninventory_agents_id']; // generated by FusionInventory

Expand Down

0 comments on commit 67e5aa4

Please sign in to comment.