[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r321551 - in /team/irroot/di...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 2 03:47:00 CDT 2011


Author: irroot
Date: Thu Jun  2 03:46:53 2011
New Revision: 321551

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321551
Log:
Prevent a possible deadlock using correct locking order

Modified:
    team/irroot/distrotech-customers-trunk/   (props changed)
    team/irroot/distrotech-customers-trunk/cel/cel_odbc.c   (props changed)
    team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample   (props changed)
    team/irroot/distrotech-customers-trunk/main/pbx.c
    team/irroot/distrotech-customers-trunk/sounds/Makefile   (props changed)

Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 03:46:53 2011
@@ -1,4 +1,4 @@
 /team/irroot/app_queue-trunk:318983-319002
 /team/irroot/distrotech-customers:318992-318995,318997-319000
-/team/irroot/distrotech-customers-1.8:319062,319075
+/team/irroot/distrotech-customers-1.8:319062,319075,321526,321549-321550
 /team/irroot/t38gateway-trunk:318974-319016,319064,319067,319071,320879,321513

Propchange: team/irroot/distrotech-customers-trunk/cel/cel_odbc.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 03:46:53 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3/cel/cel_adaptive_odbc.c:256426
 /team/irroot/app_queue-trunk/cel/cel_odbc.c:318983-319002
 /team/irroot/distrotech-customers/cel/cel_odbc.c:318992-319000
-/team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319062,319075
+/team/irroot/distrotech-customers-1.8/cel/cel_odbc.c:319062,319075,321526,321549-321550
 /team/irroot/t38gateway-trunk/cel/cel_odbc.c:318974-319016,319064,319067,319071,319361,320879,321513

Propchange: team/irroot/distrotech-customers-trunk/configs/cel_odbc.conf.sample
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 03:46:53 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3/configs/cel_adaptive_odbc.conf.sample:256426
 /team/irroot/app_queue-trunk/configs/cel_odbc.conf.sample:318983-319002
 /team/irroot/distrotech-customers/configs/cel_odbc.conf.sample:318992-319000
-/team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319062,319075
+/team/irroot/distrotech-customers-1.8/configs/cel_odbc.conf.sample:319062,319075,321526,321549-321550
 /team/irroot/t38gateway-trunk/configs/cel_odbc.conf.sample:318974-319016,319064,319067,319071,319361,320879,321513

Modified: team/irroot/distrotech-customers-trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/main/pbx.c?view=diff&rev=321551&r1=321550&r2=321551
==============================================================================
--- team/irroot/distrotech-customers-trunk/main/pbx.c (original)
+++ team/irroot/distrotech-customers-trunk/main/pbx.c Thu Jun  2 03:46:53 2011
@@ -4397,11 +4397,10 @@
 
 		/* Device state changed since last check - notify the watchers */
 
-		ao2_lock(hints);
-		while (ao2_trylock(hint)) {
-			ao2_unlock(hints);
+		while (ao2_trylock(hints)) {
+			ao2_unlock(hint);
 			usleep(1);
-			ao2_lock(hints);
+			ao2_lock(hint);
 		}
 
 		if (hint->exten == NULL) {
@@ -4563,7 +4562,9 @@
 	} else { /* callback with extension, find the callback based on ID */
 		struct ast_hint *hint;
 
+		ao2_lock(hints);
 		hint = ao2_callback(hints, 0, find_hint_by_cb_id, &id);
+		ao2_unlock(hints);
 
 		if (hint) {
 			ao2_lock(hint);

Propchange: team/irroot/distrotech-customers-trunk/sounds/Makefile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun  2 03:46:53 2011
@@ -1,5 +1,5 @@
 /be/branches/C.3/sounds/Makefile:256426
 /team/irroot/app_queue-trunk/sounds/Makefile:318983-319002
 /team/irroot/distrotech-customers/sounds/Makefile:318992-319000
-/team/irroot/distrotech-customers-1.8/sounds/Makefile:319062,319075
+/team/irroot/distrotech-customers-1.8/sounds/Makefile:319062,319075,321526,321549-321550
 /team/irroot/t38gateway-trunk/sounds/Makefile:318974-319016,319064,319067,319071,319361,320879,321513




More information about the asterisk-commits mailing list