[asterisk-commits] rmudgett: branch rmudgett/mwi r255113 - /team/rmudgett/mwi/channels/sig_pri.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 26 17:41:12 CDT 2010


Author: rmudgett
Date: Fri Mar 26 17:41:08 2010
New Revision: 255113

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=255113
Log:
Make sure that the libpri lock is initialized before we subscribe to the MWI events.

Modified:
    team/rmudgett/mwi/channels/sig_pri.c

Modified: team/rmudgett/mwi/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/mwi/channels/sig_pri.c?view=diff&rev=255113&r1=255112&r2=255113
==============================================================================
--- team/rmudgett/mwi/channels/sig_pri.c (original)
+++ team/rmudgett/mwi/channels/sig_pri.c Fri Mar 26 17:41:08 2010
@@ -4870,7 +4870,11 @@
 			pri->mbox[i].sub = ast_event_unsubscribe(pri->mbox[i].sub);
 		}
 	}
-
+#endif	/* defined(HAVE_PRI_MWI) */
+
+	ast_mutex_init(&pri->lock);
+
+#if defined(HAVE_PRI_MWI)
 	/*
 	 * Split the mwi_mailboxes configuration string into the mbox[]:
 	 * mailbox_number[@context]{,mailbox_number[@context]}
@@ -4914,8 +4918,6 @@
 		++i;
 	}
 #endif	/* defined(HAVE_PRI_MWI) */
-
-	ast_mutex_init(&pri->lock);
 
 	for (i = 0; i < NUM_DCHANS; i++) {
 		if (pri->fds[i] == -1) {




More information about the asterisk-commits mailing list