2012-11-20 Sergio Martin <sergio.martin@artica.es>
* pandora_windows_service.cc: Fixed some bugs of the type conversions git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7167 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2debc7c2fc
commit
d35f66391b
pandora_agents/win32
|
@ -1,3 +1,8 @@
|
|||
2012-11-20 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* pandora_windows_service.cc: Fixed some bugs
|
||||
of the type conversions
|
||||
|
||||
2012-11-20 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* pandora_windows_service.cc: Added support for
|
||||
|
|
|
@ -1336,10 +1336,12 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) {
|
|||
|
||||
/* Write custom fields */
|
||||
int c = 1;
|
||||
char numstr[21]; // enough to hold all numbers up to 64-bits
|
||||
sprintf(numstr, "%d", c);
|
||||
string token_name = conf->getValue ("custom_field"+numstr+"_name");
|
||||
string token_value = conf->getValue ("custom_field"+numstr+"_value");
|
||||
char custom_field_name_token[21]; // enough to hold all numbers up to 64-bits
|
||||
char custom_field_value_token[21]; // enough to hold all numbers up to 64-bits
|
||||
sprintf(custom_field_name_token, "custom_field%d_name", c);
|
||||
sprintf(custom_field_value_token, "custom_field%d_value", c);
|
||||
string token_name = conf->getValue (custom_field_name_token);
|
||||
string token_value = conf->getValue (custom_field_value_token);
|
||||
|
||||
if(token_name != "" && token_value != "") {
|
||||
data_xml += "<custom_fields>\n";
|
||||
|
@ -1350,9 +1352,10 @@ Pandora_Windows_Service::sendXml (Pandora_Module_List *modules) {
|
|||
data_xml += " </field>\n";
|
||||
|
||||
c++;
|
||||
sprintf(numstr, "%d", c);
|
||||
token_name = conf->getValue ("custom_field"+numstr+"_name");
|
||||
token_value = conf->getValue ("custom_field"+numstr+"_value");
|
||||
sprintf(custom_field_name_token, "custom_field%d_name", c);
|
||||
sprintf(custom_field_value_token, "custom_field%d_value", c);
|
||||
token_name = conf->getValue (custom_field_name_token);
|
||||
token_value = conf->getValue (custom_field_value_token);
|
||||
}
|
||||
data_xml += "</custom_fields>\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue