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.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272052
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
#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) {