From 102c76a9c8365fe9cb1c61bdec65447585a77012 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 20 May 2005 16:30:13 +0000 Subject: 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 --- funcs/func_logic.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'funcs') 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); -- cgit v1.2.3