diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-20 16:30:13 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-20 16:30:13 +0000 |
commit | cfd99de79e83b24f1f9aa407e194affbb1573dfc (patch) | |
tree | 64dd4eded77bcd188fbbfead9571d7128314ec5e /funcs | |
parent | c862bed097b69d753183d2948212755dda02c98f (diff) |
make IF dialplan function handle quoted strings properly (bug #4322, with API mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5750 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rwxr-xr-x | funcs/func_logic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/funcs/func_logic.c b/funcs/func_logic.c index 41a50e359..d4e6cdfb7 100755 --- a/funcs/func_logic.c +++ b/funcs/func_logic.c @@ -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); |