mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Read lock the contexts to maintain the locking order when we are notified that the state of a device has changed.
(closes issue #13839) Reported by: mcallist git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2027,6 +2027,7 @@ void ast_hint_state_changed(const char *device)
|
||||
{
|
||||
struct ast_hint *hint;
|
||||
|
||||
ast_rdlock_contexts();
|
||||
AST_LIST_LOCK(&hints);
|
||||
|
||||
AST_LIST_TRAVERSE(&hints, hint, list) {
|
||||
@@ -2064,6 +2065,7 @@ void ast_hint_state_changed(const char *device)
|
||||
}
|
||||
|
||||
AST_LIST_UNLOCK(&hints);
|
||||
ast_unlock_contexts();
|
||||
}
|
||||
|
||||
/*! \brief ast_extension_state_add: Add watcher for extension states */
|
||||
|
Reference in New Issue
Block a user