mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2008-07-22 Ramon Novoa <rnovoa@artica.es>
* win32/modules/pandora_module.cc: Fixed a bug that made the agent crash when a module returned data of the wrong type. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@966 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
58f26727ed
commit
18a764f6ec
@ -1,3 +1,8 @@
|
||||
2008-07-22 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* win32/modules/pandora_module.cc: Fixed a bug that made the agent
|
||||
crash when a module returned data of the wrong type.
|
||||
|
||||
2008-07-17 Manuel Arostegui <marostegui@artica.es>
|
||||
|
||||
* linux/pandora_agent.conf: Removed enabled debug by
|
||||
|
@ -350,7 +350,13 @@ Pandora_Module::getXml () {
|
||||
data = *iter;
|
||||
data_element = new TiXmlElement ("data");
|
||||
element = new TiXmlElement ("value");
|
||||
try {
|
||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||
} catch (Output_Error e) {
|
||||
delete element;
|
||||
continue;
|
||||
}
|
||||
|
||||
text = new TiXmlText (data_clean);
|
||||
element->InsertEndChild (*text);
|
||||
data_element->InsertEndChild (*element);
|
||||
@ -372,11 +378,14 @@ Pandora_Module::getXml () {
|
||||
} else {
|
||||
data = data_list->front ();
|
||||
element = new TiXmlElement ("data");
|
||||
try {
|
||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||
text = new TiXmlText (data_clean);
|
||||
element->InsertEndChild (*text);
|
||||
root->InsertEndChild (*element);
|
||||
delete text;
|
||||
} catch (Output_Error e) {
|
||||
}
|
||||
delete element;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user