[asterisk-commits] rmudgett: branch 1.4 r272446 - /branches/1.4/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 24 16:58:57 CDT 2010


Author: rmudgett
Date: Thu Jun 24 16:58:49 2010
New Revision: 272446

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272446
Log:
ss_thread calls pri_grab without lock during overlap dial

Recent changes to chan_dahdi with relation to overlap dialing call
pri_grab without first obtaining a lock.

(closes issue #17414)
Reported by: pdf
Patches:
      bug17414.patch uploaded by jpeeler (license 325)

Modified:
    branches/1.4/channels/chan_dahdi.c

Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=272446&r1=272445&r2=272446
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Thu Jun 24 16:58:49 2010
@@ -6048,6 +6048,7 @@
 				ast_dsp_digitreset(p->dsp);
 			}
 			if (p->pri->overlapdial & DAHDI_OVERLAPDIAL_INCOMING) {
+				ast_mutex_lock(&p->lock);
 				if (p->pri->pri) {		
 					if (!pri_grab(p, p->pri)) {
 						pri_proceeding(p->pri->pri, p->call, PVT_TO_CHANNEL(p), 0);
@@ -6057,6 +6058,7 @@
 						ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
 					}
 				}
+				ast_mutex_unlock(&p->lock);
 			}
 			dahdi_enable_ec(p);
 			ast_setstate(chan, AST_STATE_RING);




More information about the asterisk-commits mailing list