[svn-commits] mmichelson: branch 1.4 r148912 - /branches/1.4/channels/chan_local.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 14 12:33:39 CDT 2008


Author: mmichelson
Date: Tue Oct 14 12:33:38 2008
New Revision: 148912

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148912
Log:
Deadlock prevention in chan_local.

(closes issue #13676)
Reported by: tacvbo
Patches:
      13676.patch uploaded by putnopvut (license 60)
Tested by: tacvbo


Modified:
    branches/1.4/channels/chan_local.c

Modified: branches/1.4/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_local.c?view=diff&rev=148912&r1=148911&r2=148912
==============================================================================
--- branches/1.4/channels/chan_local.c (original)
+++ branches/1.4/channels/chan_local.c Tue Oct 14 12:33:38 2008
@@ -554,8 +554,12 @@
 	} else {
 		p->owner = NULL;
 		ast_module_user_remove(p->u_owner);
+		while (p->chan && ast_channel_trylock(p->chan)) {
+			DEADLOCK_AVOIDANCE(&p->lock);
+		}
 		if (p->chan) {
 			ast_queue_hangup(p->chan);
+			ast_channel_unlock(p->chan);
 		}
 	}
 	




More information about the svn-commits mailing list