[dahdi-commits] tzafrir: branch linux/tzafrir/fxo_asterisk_workaround r4780 - /linux/team/tza...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Aug 14 06:54:28 CDT 2008


Author: tzafrir
Date: Thu Aug 14 06:54:28 2008
New Revision: 4780

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4780
Log:
If a channel is in alarm when it is opened, send a new event about it.

Modified:
    linux/team/tzafrir/fxo_asterisk_workaround/drivers/dahdi/dahdi-base.c

Modified: linux/team/tzafrir/fxo_asterisk_workaround/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/team/tzafrir/fxo_asterisk_workaround/drivers/dahdi/dahdi-base.c?view=diff&rev=4780&r1=4779&r2=4780
==============================================================================
--- linux/team/tzafrir/fxo_asterisk_workaround/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/tzafrir/fxo_asterisk_workaround/drivers/dahdi/dahdi-base.c Thu Aug 14 06:54:28 2008
@@ -2544,6 +2544,25 @@
 			}
 			if (!res) {
 				chans[unit]->file = file;
+#define ASTERISK_BAD_INALARM
+#ifdef ASTERISK_BAD_INALARM
+				if(chans[unit]->chan_alarms) {
+					/*
+					 * Asterisk called our open,
+					 * resend channel alarms (they got lost
+					 * before open).
+					 *
+					 * This should really be handled by chan_dahdi:
+					 *   - After open() it calls DAHDI_SPANSTAT ioctl
+					 *   - If there are alarms, than inalarm
+					 *     in dahdi_pvt should be set to true.
+					 * When this is done, we can remove the following code.
+					 *
+					 * See also * http://bugs.digium.com/12160
+					 */
+					dahdi_qevent_nolock(chans[unit], DAHDI_EVENT_ALARM);
+				}
+#endif
 				spin_unlock_irqrestore(&chans[unit]->lock, flags);
 			} else {
 				spin_unlock_irqrestore(&chans[unit]->lock, flags);




More information about the dahdi-commits mailing list