[svn-commits] kpfleming: branch 1.4 r132942 - /branches/1.4/channels/chan_dahdi.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jul 23 10:52:29 CDT 2008
Author: kpfleming
Date: Wed Jul 23 10:52:29 2008
New Revision: 132942
URL: http://svn.digium.com/view/asterisk?view=rev&rev=132942
Log:
ensure that after a channel is created, if it happened to be in 'channel alarm' state, when that alarm clears we won't generate a spurious 'alarm cleared' message
(closes issue #12160)
Reported by: tzafrir
Modified:
branches/1.4/channels/chan_dahdi.c
Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=132942&r1=132941&r2=132942
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Wed Jul 23 10:52:29 2008
@@ -7586,12 +7586,25 @@
ioctl(tmp->subs[SUB_REAL].dfd,DAHDI_SETTONEZONE,&tmp->tonezone);
#ifdef HAVE_PRI
/* the dchannel is down so put the channel in alarm */
- if (tmp->pri && !pri_is_up(tmp->pri))
+ if (tmp->pri && !pri_is_up(tmp->pri)) {
tmp->inalarm = 1;
+ }
#endif
if ((res = get_alarms(tmp)) != DAHDI_ALARM_NONE) {
tmp->inalarm = 1;
handle_alarms(tmp, res);
+ } else {
+ /* yes, this looks strange... the unknown_alarm flag is only used to
+ control whether an 'alarm cleared' message gets generated when we
+ get an indication that the channel is no longer in alarm status.
+ however, the channel *could* be in an alarm status that we aren't
+ aware of (since get_alarms() only reports span alarms, not channel
+ alarms). setting this flag will cause any potential 'alarm cleared'
+ message to be suppressed, but if a real alarm occurs before that
+ happens, this flag will get cleared by it and the situation will
+ be normal.
+ */
+ tmp->unknown_alarm = 1;
}
}
More information about the svn-commits
mailing list