mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-23 16:05:30 -07:00
Ensure channel locks aren't held while calling ast_set_variables.
If the channel is locked when calling ast_set_variables and any of the variables contained dialplan functions, there's a possiblilty of a deadlock. To prevent this, either the explicit locks were removed or the call to ast_set_variables moved out of the lock scope. A warning to not hold channel locks is also added to the documentation for ast_set_variables. Resolves: #1936
This commit is contained in:
committed by
Asterisk Development Team
parent
2a64ca82e6
commit
1982afca0d
@@ -2749,7 +2749,8 @@ void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_
|
||||
* \param chan the channel
|
||||
* \param vars a linked list of variables
|
||||
*
|
||||
* \pre chan is locked
|
||||
* \warning The channel must not be locked if there's a possibility that
|
||||
* a dialplan function would be invoked.
|
||||
*
|
||||
* \details
|
||||
* Variable names can be for a regular channel variable or a dialplan function
|
||||
|
||||
Reference in New Issue
Block a user