aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_cdr.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-06 20:52:04 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-06 20:52:04 +0000
commit3b1bf702011c08401b97cee1017895dfcc7ee264 (patch)
treece7af6e2837fc62eebc72d3fa67614f23e1579cf /funcs/func_cdr.c
parenta4c4257ac1ae5b983a65863f0c610822ee0623f3 (diff)
Dialplan functions should not actually return 0, unless they have modified the
workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146799 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_cdr.c')
-rw-r--r--funcs/func_cdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index 08dedcb1e..4e90246c4 100644
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -88,7 +88,7 @@ static int cdr_read(struct ast_channel *chan, char *cmd, char *parse,
ast_test_flag(&flags, OPT_RECURSIVE),
ast_test_flag(&flags, OPT_UNPARSED));
- return 0;
+ return ret ? 0 : -1;
}
static int cdr_write(struct ast_channel *chan, char *cmd, char *parse,