[asterisk-commits] file: trunk r169869 - in /trunk: ./ main/pbx.c

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


Author: file
Date: Wed Jan 21 17:25:27 2009
New Revision: 169869

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=169869
Log:
Merged revisions 169867 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r169867 | file | 2009-01-21 19:20:47 -0400 (Wed, 21 Jan 2009) | 4 lines
  
  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:
    trunk/   (props changed)
    trunk/main/pbx.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=169869&r1=169868&r2=169869
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Jan 21 17:25:27 2009
@@ -3774,6 +3774,8 @@
 {
 	struct ast_hint *hint;
 	struct statechange *sc = datap;
+
+	ast_rdlock_contexts();
 	AST_RWLIST_RDLOCK(&hints);
 
 	AST_RWLIST_TRAVERSE(&hints, hint, list) {
@@ -3812,6 +3814,7 @@
 		hint->laststate = state;	/* record we saw the change */
 	}
 	AST_RWLIST_UNLOCK(&hints);
+	ast_unlock_contexts();
 	ast_free(sc);
 	return 0;
 }




More information about the asterisk-commits mailing list