aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-26 13:54:30 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-26 13:54:30 +0000
commit237b86b3225b873b1fb4f3345e725cb71da5e566 (patch)
tree13486bf8b9bae79e8ec883a6d8a45d7d1d8de93f /funcs
parent7343abf86992cbec54890cf2d858134f30039d59 (diff)
The addition of autoservice to func_curl additionally made func_curl dependent
on the existence of a channel, with no real reason. This should make func_curl once again work without a channel. Reported by jmls. Fixed by tilghman. Closes issue #11090 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87120 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_curl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 940dfd8e2..63d6a0597 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -145,7 +145,8 @@ static int acf_curl_exec(struct ast_channel *chan, char *cmd, char *info, char *
AST_STANDARD_APP_ARGS(args, info);
- ast_autoservice_start(chan);
+ if (chan)
+ ast_autoservice_start(chan);
if (!curl_internal(&chunk, args.url, args.postdata)) {
if (chunk.memory) {
@@ -160,7 +161,8 @@ static int acf_curl_exec(struct ast_channel *chan, char *cmd, char *info, char *
ast_log(LOG_ERROR, "Cannot allocate curl structure\n");
}
- ast_autoservice_stop(chan);
+ if (chan)
+ ast_autoservice_stop(chan);
ast_module_user_remove(u);