mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
add more nested var tricks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6174 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
43092c75f7
commit
d2bd9c4fa3
@ -1397,7 +1397,13 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
|
|||||||
SWITCH_STANDARD_STREAM(stream);
|
SWITCH_STANDARD_STREAM(stream);
|
||||||
|
|
||||||
if (stream.data) {
|
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) {
|
if ((expanded = switch_channel_expand_variables(channel, vval)) == vval) {
|
||||||
expanded = NULL;
|
expanded = NULL;
|
||||||
@ -1413,6 +1419,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(expanded);
|
switch_safe_free(expanded);
|
||||||
|
switch_safe_free(expanded_vname);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user