From: Joshua Colp Date: Sat, 14 Mar 2015 02:00:29 +0000 (+0000) Subject: func_curl: Don't hold exclusive lock when performing HTTP request. X-Git-Tag: 13.3.0-rc1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7c6bedb061b6e609d8ec0a1a9c67e1ba6ba194d;p=thirdparty%2Fasterisk.git 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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432949 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 12b2c7c6f7..1e152b73a0 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);