[asterisk-commits] russell: trunk r272052 - /trunk/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jun 22 18:20:41 CDT 2010


Author: russell
Date: Tue Jun 22 18:20:37 2010
New Revision: 272052

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272052
Log:
Don't try to lock/unlock an uninitialized lock on a dahdi_pri.

This small changes prevents destroy_all_channels() from accessing a lock on an
unused dahdi_pri struct, resolving a ton of ERRORs that get spewed out when
shutting Asterisk down gracefully.

Modified:
    trunk/channels/chan_dahdi.c

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=272052&r1=272051&r2=272052
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Jun 22 18:20:37 2010
@@ -5484,6 +5484,9 @@
 #if defined(HAVE_PRI)
 	/* Destroy all of the no B channel interface lists */
 	for (span = 0; span < NUM_SPANS; ++span) {
+		if (!pris[span].dchannels[0]) {
+			break;
+		}
 		pri = &pris[span].pri;
 		ast_mutex_lock(&pri->lock);
 		while (pri->no_b_chan_iflist) {




More information about the asterisk-commits mailing list