diff --git a/pandora_agents/ChangeLog b/pandora_agents/ChangeLog index cfec487a9b..c19771a75f 100644 --- a/pandora_agents/ChangeLog +++ b/pandora_agents/ChangeLog @@ -1,3 +1,8 @@ +2010-09-20 Ramon Novoa + + * unix/pandora_agent, win32/modules/pandora_module.cc: Added + module_interval information to the data XML. + 2010-09-17 Junichi Satoh * unix/SunOS/make_solaris_package/README, diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 49dc678ffd..39e470350d 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1171,6 +1171,10 @@ sub write_module_xml ($@) { " {'description'} . "]]>\n" . " " . $module->{'type'} . "\n"; + if ($module->{'interval'} > 1) { + $Xml .= " " . $module->{'interval'} . "\n"; + } + # Data list if ($#data > 0) { $Xml .= " \n"; diff --git a/pandora_agents/win32/modules/pandora_module.cc b/pandora_agents/win32/modules/pandora_module.cc index 93abf9c664..3cdf8fabc4 100644 --- a/pandora_agents/win32/modules/pandora_module.cc +++ b/pandora_agents/win32/modules/pandora_module.cc @@ -22,6 +22,9 @@ #include "../pandora_strutils.h" #include "../pandora.h" +#include +#include + using namespace Pandora; using namespace Pandora_Modules; using namespace Pandora_Strutils; @@ -415,7 +418,8 @@ Pandora_Module::run () { */ string Pandora_Module::getXml () { - string module_xml, data_clean; + ostringstream module_interval; + string module_xml, data_clean, interval_str; Pandora_Data *data; pandoraDebug ("%s getXML begin", module_name.c_str ()); @@ -436,7 +440,13 @@ Pandora_Module::getXml () { module_xml += this->module_description; module_xml += "]]>\n"; } - + if (this->module_interval > 1) { + module_interval << this->module_interval; + module_xml += "\t\n"; + } + /* Write module data */ if (this->data_list && this->data_list->size () > 1) { list::iterator iter;