diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-10-06 21:09:05 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-10-06 21:09:05 +0000 |
commit | 63b165dbb98c65a3e0b6271d9221e045685bd986 (patch) | |
tree | e9c0dfb82bcb18454c0f9a712acbe7933fc7ad81 /funcs/func_curl.c | |
parent | 9b0a2e5231dcff56f68b5e629f059260885665e0 (diff) |
Merged revisions 146799 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines
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: https://origsvn.digium.com/svn/asterisk/trunk@146802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_curl.c')
-rw-r--r-- | funcs/func_curl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 107b4e11e..e385ed9e1 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -397,6 +397,7 @@ AST_THREADSTORAGE_CUSTOM(curl_instance, curl_instance_init, curl_instance_cleanu static int acf_curl_exec(struct ast_channel *chan, const char *cmd, char *info, char *buf, size_t len) { struct ast_str *str = ast_str_create(16); + int ret = -1; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(url); AST_APP_ARG(postdata); @@ -494,13 +495,14 @@ static int acf_curl_exec(struct ast_channel *chan, const char *cmd, char *info, } else { ast_copy_string(buf, str->str, len); } + ret = 0; } ast_free(str); if (chan) ast_autoservice_stop(chan); - return 0; + return ret; } struct ast_custom_function acf_curl = { |