From fb2768066abfd8fb55473f1c33dc7be4f780dde3 Mon Sep 17 00:00:00 2001 From: ramonn Date: Mon, 16 Sep 2013 09:30:02 +0000 Subject: [PATCH] 2013-09-16 Ramon Novoa * modules/pandora_module_inventory.cc: Do not output anything if the module has no data. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8771 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/win32/ChangeLog | 5 +++++ pandora_agents/win32/modules/pandora_module_inventory.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_agents/win32/ChangeLog b/pandora_agents/win32/ChangeLog index f4ebda1db5..cbff6aa105 100644 --- a/pandora_agents/win32/ChangeLog +++ b/pandora_agents/win32/ChangeLog @@ -1,3 +1,8 @@ +2013-09-16 Ramon Novoa + + * modules/pandora_module_inventory.cc: Do not output anything if the + module has no data. + 2013-08-08 Ramon Novoa * modules/pandora_module_logevent.h: Updated the EventID mask. The diff --git a/pandora_agents/win32/modules/pandora_module_inventory.cc b/pandora_agents/win32/modules/pandora_module_inventory.cc index 022d5e9a34..d5f3ecf56f 100644 --- a/pandora_agents/win32/modules/pandora_module_inventory.cc +++ b/pandora_agents/win32/modules/pandora_module_inventory.cc @@ -310,12 +310,12 @@ Pandora_Module_Inventory::getXml() { if (!this->has_output || this->inventory_list == NULL) { return ""; } - - module_xml = "\t\n"; if (this->inventory_list && this->inventory_list->size () > 1) { list::iterator iter; + module_xml = "\t\n"; + for (iter = this->inventory_list->begin (); iter != this->inventory_list->end (); iter++) {