[svn-commits] rmudgett: branch rmudgett/bch_shift_v1.8 r311682 - /team/rmudgett/bch_shift_v...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Mar 25 12:59:02 CDT 2011


Author: rmudgett
Date: Fri Mar 25 12:58:58 2011
New Revision: 311682

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311682
Log:
Prevent potential deadlock with failed idle call.

Modified:
    team/rmudgett/bch_shift_v1.8/channels/sig_pri.c

Modified: team/rmudgett/bch_shift_v1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.8/channels/sig_pri.c?view=diff&rev=311682&r1=311681&r2=311682
==============================================================================
--- team/rmudgett/bch_shift_v1.8/channels/sig_pri.c (original)
+++ team/rmudgett/bch_shift_v1.8/channels/sig_pri.c Fri Mar 25 12:58:58 2011
@@ -4561,7 +4561,9 @@
 						pri->pvts[nextidle]->isidlecall = 1;
 						if (ast_pthread_create_background(&p, NULL, do_idle_thread, pri->pvts[nextidle])) {
 							ast_log(LOG_WARNING, "Unable to start new thread for idle channel '%s'\n", idle->name);
+							ast_mutex_unlock(&pri->lock);
 							ast_hangup(idle);
+							ast_mutex_lock(&pri->lock);
 						}
 					} else {
 						pri->pvts[nextidle]->allocated = 0;




More information about the svn-commits mailing list