fix xml code to dup the values instead of store direct pointers (scope issue)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12692 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-03-20 20:41:30 +00:00
parent 3aacae1aa3
commit 5b6b9f89ab
2 changed files with 16 additions and 16 deletions

View File

@@ -1634,67 +1634,67 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_profile_data(switch_xml_t xml, switch_cal
if (!(param = switch_xml_add_child_d(xml, "username", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->username);
switch_xml_set_txt_d(param, caller_profile->username);
if (!(param = switch_xml_add_child_d(xml, "dialplan", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->dialplan);
switch_xml_set_txt_d(param, caller_profile->dialplan);
if (!(param = switch_xml_add_child_d(xml, "caller_id_name", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->caller_id_name);
switch_xml_set_txt_d(param, caller_profile->caller_id_name);
if (!(param = switch_xml_add_child_d(xml, "ani", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->ani);
switch_xml_set_txt_d(param, caller_profile->ani);
if (!(param = switch_xml_add_child_d(xml, "aniii", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->aniii);
switch_xml_set_txt_d(param, caller_profile->aniii);
if (!(param = switch_xml_add_child_d(xml, "caller_id_number", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->caller_id_number);
switch_xml_set_txt_d(param, caller_profile->caller_id_number);
if (!(param = switch_xml_add_child_d(xml, "network_addr", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->network_addr);
switch_xml_set_txt_d(param, caller_profile->network_addr);
if (!(param = switch_xml_add_child_d(xml, "rdnis", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->rdnis);
switch_xml_set_txt_d(param, caller_profile->rdnis);
if (!(param = switch_xml_add_child_d(xml, "destination_number", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->destination_number);
switch_xml_set_txt_d(param, caller_profile->destination_number);
if (!(param = switch_xml_add_child_d(xml, "uuid", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->uuid);
switch_xml_set_txt_d(param, caller_profile->uuid);
if (!(param = switch_xml_add_child_d(xml, "source", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->source);
switch_xml_set_txt_d(param, caller_profile->source);
if (!(param = switch_xml_add_child_d(xml, "context", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->context);
switch_xml_set_txt_d(param, caller_profile->context);
if (!(param = switch_xml_add_child_d(xml, "chan_name", off++))) {
return -1;
}
switch_xml_set_txt(param, caller_profile->chan_name);
switch_xml_set_txt_d(param, caller_profile->chan_name);
return off;
}