From f59ad2a3eda33034af003692b74d641d6753f994 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 19 Sep 2007 19:34:25 +0000 Subject: [PATCH] Using curl can take a substantial amount of time, so the channel should be autoserviced while waiting for it to complete. (closes issue #10725, reported by mnicholson) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83177 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- funcs/func_curl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 08e786eaff..940dfd8e21 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -145,6 +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 (!curl_internal(&chunk, args.url, args.postdata)) { if (chunk.memory) { chunk.memory[chunk.size] = '\0'; @@ -158,6 +160,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); + ast_module_user_remove(u); return 0;