Skip to content

Commit

Permalink
Put versionclient in the lowest common denominator
Browse files Browse the repository at this point in the history
  • Loading branch information
jackburton79 committed Apr 4, 2024
1 parent d621282 commit e55ac37
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ Inventory::Build(bool noSoftware)
Logger::Log(LOG_WARNING, "No inventory format specified. Using lowest common denominator.");
}
try {
if (inventoryFormat == "FORMAT_GLPI") {
tinyxml2::XMLElement* versionClient = fDocument->NewElement("VERSIONCLIENT");
versionClient->LinkEndChild(fDocument->NewText("1.9.9"));
fContent->LinkEndChild(versionClient);
}
// GLPI refuses the inventory if this field is missing, ocsinventory doesn't
// care if it's present, so we always add it
// TODO: get the real version of the agent

tinyxml2::XMLElement* versionClient = fDocument->NewElement("VERSIONCLIENT");
versionClient->LinkEndChild(fDocument->NewText("1.9.9"));
fContent->LinkEndChild(versionClient);

_AddAccountInfo();
_AddBIOSInfo();
_AddOperatingSystemInfo();
Expand Down

0 comments on commit e55ac37

Please sign in to comment.