[asterisk-commits] file: branch 1.4 r169867 - /branches/1.4/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 21 17:20:47 CST 2009


Author: file
Date: Wed Jan 21 17:20:47 2009
New Revision: 169867

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

Modified:
    branches/1.4/main/pbx.c

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=169867&r1=169866&r2=169867
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Wed Jan 21 17:20:47 2009
@@ -2027,6 +2027,7 @@
 {
 	struct ast_hint *hint;
 
+	ast_rdlock_contexts();
 	AST_LIST_LOCK(&hints);
 
 	AST_LIST_TRAVERSE(&hints, hint, list) {
@@ -2064,6 +2065,7 @@
 	}
 
 	AST_LIST_UNLOCK(&hints);
+	ast_unlock_contexts();
 }
 
 /*! \brief  ast_extension_state_add: Add watcher for extension states */




More information about the asterisk-commits mailing list