mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
make IF dialplan function handle quoted strings properly (bug #4322, with API mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -55,6 +55,12 @@ static char *builtin_function_if(struct ast_channel *chan, char *cmd, char *data
|
||||
}
|
||||
|
||||
if (expr && iftrue) {
|
||||
expr = ast_strip_quoted(expr, "\"", "\"");
|
||||
iftrue = ast_strip_quoted(iftrue, "\"", "\"");
|
||||
|
||||
if (iffalse) {
|
||||
iffalse = ast_strip_quoted(iffalse, "\"", "\"");
|
||||
}
|
||||
ret = ast_true(expr) ? iftrue : iffalse;
|
||||
if (ret) {
|
||||
ast_copy_string(buf, ret, len);
|
||||
|
Reference in New Issue
Block a user