mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Dialplan functions: Fix some channel autoservice misuse.
* Fix off nominal paths leaving the channel in autoservice. * Remove unnecessary start/stop channel autoservice. * Fix channel locking around a channel datastore search. Change-Id: I7ff2e42388064fe3149034ecae57604040b8b540
This commit is contained in:
@@ -672,14 +672,19 @@ static int acf_curl_helper(struct ast_channel *chan, struct curl_args *args)
|
||||
}
|
||||
AST_LIST_UNLOCK(&global_curl_info);
|
||||
|
||||
if (chan && (store = ast_channel_datastore_find(chan, &curl_info, NULL))) {
|
||||
list = store->data;
|
||||
AST_LIST_LOCK(list);
|
||||
AST_LIST_TRAVERSE(list, cur, list) {
|
||||
if (cur->key == CURLOPT_SPECIAL_HASHCOMPAT) {
|
||||
hashcompat = (long) cur->value;
|
||||
} else {
|
||||
curl_easy_setopt(*curl, cur->key, cur->value);
|
||||
if (chan) {
|
||||
ast_channel_lock(chan);
|
||||
store = ast_channel_datastore_find(chan, &curl_info, NULL);
|
||||
ast_channel_unlock(chan);
|
||||
if (store) {
|
||||
list = store->data;
|
||||
AST_LIST_LOCK(list);
|
||||
AST_LIST_TRAVERSE(list, cur, list) {
|
||||
if (cur->key == CURLOPT_SPECIAL_HASHCOMPAT) {
|
||||
hashcompat = (long) cur->value;
|
||||
} else {
|
||||
curl_easy_setopt(*curl, cur->key, cur->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user