don't set blank vars, and handle them in error cases.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7138 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-01-08 16:20:00 +00:00
parent 5b01ced55c
commit 31d0a1a02d
2 changed files with 2 additions and 2 deletions

View File

@@ -1323,7 +1323,7 @@ SWITCH_DECLARE(int) switch_ivr_set_xml_chan_vars(switch_xml_t xml, switch_channe
if (!hi) return off;
for (; hi; hi = hi->next) {
if (hi->name && hi->value && ((variable = switch_xml_add_child_d(xml, hi->name, off++)))) {
if (!switch_strlen_zero(hi->name) && !switch_strlen_zero(hi->value) && ((variable = switch_xml_add_child_d(xml, hi->name, off++)))) {
char *data;
switch_size_t dlen = strlen(hi->value) * 3;