2010-09-20 Ramon Novoa <rnovoa@artica.es>

* unix/pandora_agent, win32/modules/pandora_module.cc: Added
	  module_interval information to the data XML.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3260 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2010-09-20 15:03:06 +00:00
parent 3b0ab1e3d2
commit 49f8c027de
3 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-09-20 Ramon Novoa <rnovoa@artica.es>
* unix/pandora_agent, win32/modules/pandora_module.cc: Added
module_interval information to the data XML.
2010-09-17 Junichi Satoh <junichi@rworks.jp>
* unix/SunOS/make_solaris_package/README,

View File

@ -1171,6 +1171,10 @@ sub write_module_xml ($@) {
" <description><![CDATA[" . $module->{'description'} . "]]></description>\n" .
" <type>" . $module->{'type'} . "</type>\n";
if ($module->{'interval'} > 1) {
$Xml .= " <module_interval>" . $module->{'interval'} . "</module_interval>\n";
}
# Data list
if ($#data > 0) {
$Xml .= " <datalist>\n";

View File

@ -22,6 +22,9 @@
#include "../pandora_strutils.h"
#include "../pandora.h"
#include <iostream>
#include <sstream>
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 += "]]></description>\n";
}
if (this->module_interval > 1) {
module_interval << this->module_interval;
module_xml += "\t<module_interval><![CDATA[";
module_xml += module_interval.str ();
module_xml += "]]></module_interval>\n";
}
/* Write module data */
if (this->data_list && this->data_list->size () > 1) {
list<Pandora_Data *>::iterator iter;