[asterisk-commits] tilghman: branch 1.4 r124965 - /branches/1.4/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 24 19:46:25 CDT 2008


Author: tilghman
Date: Tue Jun 24 19:46:24 2008
New Revision: 124965

URL: http://svn.digium.com/view/asterisk?view=rev&rev=124965
Log:
Pvt deadlock causes some channels to get stuck in Reserved status.
(closes issue #12621)
 Reported by: fabianoheringer
 Patches: 
       20080612__bug12621.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fabianoheringer

Modified:
    branches/1.4/channels/chan_dahdi.c

Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=124965&r1=124964&r2=124965
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Tue Jun 24 19:46:24 2008
@@ -4637,10 +4637,11 @@
 	int index;
 	void *readbuf;
 	struct ast_frame *f;
-	
-
-	ast_mutex_lock(&p->lock);
-	
+
+	while (ast_mutex_trylock(&p->lock)) {
+		DEADLOCK_AVOIDANCE(&ast->lock);
+	}
+
 	index = dahdi_get_index(ast, p, 0);
 	
 	/* Hang up if we don't really exist */




More information about the asterisk-commits mailing list