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,10 +350,16 @@ Pandora_Module::getXml () {
|
|||
data = *iter;
|
||||
data_element = new TiXmlElement ("data");
|
||||
element = new TiXmlElement ("value");
|
||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||
text = new TiXmlText (data_clean);
|
||||
element->InsertEndChild (*text);
|
||||
data_element->InsertEndChild (*element);
|
||||
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);
|
||||
delete text;
|
||||
delete element;
|
||||
|
||||
|
@ -372,11 +378,14 @@ Pandora_Module::getXml () {
|
|||
} else {
|
||||
data = data_list->front ();
|
||||
element = new TiXmlElement ("data");
|
||||
data_clean = strreplace (this->getDataOutput (data), "%", "%%" );
|
||||
text = new TiXmlText (data_clean);
|
||||
element->InsertEndChild (*text);
|
||||
root->InsertEndChild (*element);
|
||||
delete text;
|
||||
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…
Reference in New Issue