diff options
author | Joshua Colp <jcolp@digium.com> | 2015-03-14 02:01:12 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-03-14 02:01:12 +0000 |
commit | 0d52907d2b9147fb10d4d06edc9bb28169795ea7 (patch) | |
tree | 463b0e6b18fd3c3b40d6869cf342d75f51e17deb /funcs | |
parent | ac1214d9d4412d1bae3a2596716a41688953dc30 (diff) |
func_curl: Don't hold exclusive lock when performing HTTP request.
This code originally kept a lock held when performing the HTTP
request to ensure that the options provided to curl remain valid.
This doesn't seem to be necessary these days and holding the lock
caused requests to happen sequentially instead of in parallel.
ASTERISK-18708 #close
Reported by: Dave Cabot
........
Merged revisions 432948 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 432949 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_curl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c index dcfa0f5f4..7fd56beb4 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -654,6 +654,7 @@ static int acf_curl_helper(struct ast_channel *chan, const char *cmd, char *info curl_easy_setopt(*curl, cur->key, cur->value); } } + AST_LIST_UNLOCK(&global_curl_info); if (chan && (store = ast_channel_datastore_find(chan, &curl_info, NULL))) { list = store->data; @@ -692,7 +693,6 @@ static int acf_curl_helper(struct ast_channel *chan, const char *cmd, char *info if (store) { AST_LIST_UNLOCK(list); } - AST_LIST_UNLOCK(&global_curl_info); if (args.postdata) { curl_easy_setopt(*curl, CURLOPT_POST, 0); |