]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Read lock the contexts to maintain the locking order when we are notified that the...
authorJoshua Colp <jcolp@digium.com>
Wed, 21 Jan 2009 23:20:47 +0000 (23:20 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 21 Jan 2009 23:20:47 +0000 (23:20 +0000)
(closes issue #13839)
Reported by: mcallist

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169867 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index a1a81504605a5d663a6b192c4433940e1df8e300..1cc04f504f7fee5f3ab90b6ab975cf5dc3b89e58 100644 (file)
@@ -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 */