[asterisk-commits] file: trunk r432950 - in /trunk: ./ funcs/func_curl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 13 21:01:14 CDT 2015


Author: file
Date: Fri Mar 13 21:01:12 2015
New Revision: 432950

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432950
Log:
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

Modified:
    trunk/   (props changed)
    trunk/funcs/func_curl.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.

Modified: trunk/funcs/func_curl.c
URL: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_curl.c?view=diff&rev=432950&r1=432949&r2=432950
==============================================================================
--- trunk/funcs/func_curl.c (original)
+++ trunk/funcs/func_curl.c Fri Mar 13 21:01:12 2015
@@ -654,6 +654,7 @@
 			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 @@
 	if (store) {
 		AST_LIST_UNLOCK(list);
 	}
-	AST_LIST_UNLOCK(&global_curl_info);
 
 	if (args.postdata) {
 		curl_easy_setopt(*curl, CURLOPT_POST, 0);




More information about the asterisk-commits mailing list