if (vtype == 1) {
char *expanded = NULL;
-
+
if ((expanded = switch_channel_expand_variables(channel, (char *)vname)) == vname) {
expanded = NULL;
} else {
SWITCH_STANDARD_STREAM(stream);
if (stream.data) {
-
+ char *expanded_vname = NULL;
+
+ if ((expanded_vname = switch_channel_expand_variables(channel, (char *)vname)) == vname) {
+ expanded_vname = NULL;
+ } else {
+ vname = expanded_vname;
+ }
if ((expanded = switch_channel_expand_variables(channel, vval)) == vval) {
expanded = NULL;
}
switch_safe_free(expanded);
+ switch_safe_free(expanded_vname);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");