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>
|
2008-07-17 Manuel Arostegui <marostegui@artica.es>
|
||||||
|
|
||||||
* linux/pandora_agent.conf: Removed enabled debug by
|
* linux/pandora_agent.conf: Removed enabled debug by
|
||||||
|
|
|
@ -350,10 +350,16 @@ Pandora_Module::getXml () {
|
||||||
data = *iter;
|
data = *iter;
|
||||||
data_element = new TiXmlElement ("data");
|
data_element = new TiXmlElement ("data");
|
||||||
element = new TiXmlElement ("value");
|
element = new TiXmlElement ("value");
|
||||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
try {
|
||||||
text = new TiXmlText (data_clean);
|
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||||
element->InsertEndChild (*text);
|
} catch (Output_Error e) {
|
||||||
data_element->InsertEndChild (*element);
|
delete element;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
text = new TiXmlText (data_clean);
|
||||||
|
element->InsertEndChild (*text);
|
||||||
|
data_element->InsertEndChild (*element);
|
||||||
delete text;
|
delete text;
|
||||||
delete element;
|
delete element;
|
||||||
|
|
||||||
|
@ -372,11 +378,14 @@ Pandora_Module::getXml () {
|
||||||
} else {
|
} else {
|
||||||
data = data_list->front ();
|
data = data_list->front ();
|
||||||
element = new TiXmlElement ("data");
|
element = new TiXmlElement ("data");
|
||||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
try {
|
||||||
text = new TiXmlText (data_clean);
|
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||||
element->InsertEndChild (*text);
|
text = new TiXmlText (data_clean);
|
||||||
root->InsertEndChild (*element);
|
element->InsertEndChild (*text);
|
||||||
delete text;
|
root->InsertEndChild (*element);
|
||||||
|
delete text;
|
||||||
|
} catch (Output_Error e) {
|
||||||
|
}
|
||||||
delete element;
|
delete element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue