mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
add some logic tools
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6189 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -1374,9 +1374,20 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
|
||||
while(*e == ' ') {
|
||||
*e-- = '\0';
|
||||
}
|
||||
if ((e = strchr(vval, ')'))) {
|
||||
*e = '\0';
|
||||
e = vval;
|
||||
br = 1;
|
||||
while(e && *e) {
|
||||
if (*e == '(') {
|
||||
br++;
|
||||
} else if (br > 1 && *e == ')') {
|
||||
br--;
|
||||
} else if (br == 1 && *e == ')') {
|
||||
*e = '\0';
|
||||
break;
|
||||
}
|
||||
e++;
|
||||
}
|
||||
|
||||
vtype = 2;
|
||||
}
|
||||
|
||||
@@ -1398,7 +1409,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
|
||||
|
||||
if (stream.data) {
|
||||
char *expanded_vname = NULL;
|
||||
|
||||
|
||||
if ((expanded_vname = switch_channel_expand_variables(channel, (char *)vname)) == vname) {
|
||||
expanded_vname = NULL;
|
||||
} else {
|
||||
@@ -1462,6 +1473,7 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
|
||||
}
|
||||
}
|
||||
free(indup);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user