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

@@ -454,7 +454,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *ch
if (!switch_strlen_zero(varname)) {
switch_mutex_lock(channel->profile_mutex);
switch_event_del_header(channel->variables, varname);
if (value) {
if (!switch_strlen_zero(value)) {
switch_event_add_header(channel->variables, SWITCH_STACK_BOTTOM, varname, "%s", value);
}
switch_mutex_unlock(channel->profile_mutex);