aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-08 16:14:57 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-08 16:14:57 +0000
commitbeeb96506d43a7fca547e99e8c41098794d4146c (patch)
treee6e8b2af5c99fbf5e12f680ca8dcdc572c8cc403 /channels/chan_zap.c
parentb7f244d082ab5512f1d0add63a6344fce27db4b4 (diff)
Merged revisions 106946 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r106946 | kpfleming | 2008-03-08 10:03:48 -0600 (Sat, 08 Mar 2008) | 10 lines Merged revisions 106945 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106945 | kpfleming | 2008-03-08 09:59:42 -0600 (Sat, 08 Mar 2008) | 2 lines don't generate D-Channel "up" and "down" messages unless the channel state is actually changing; also, generate the "up" message when an implicit "up" occurs due to reception of a normal event when we thought the channel was "down" ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106947 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r--channels/chan_zap.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index ea19e9f56..cb4f9aa6f 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -10299,8 +10299,18 @@ static void *pri_dchannel(void *vpri)
if (e) {
if (pri->debug)
pri_dump_event(pri->dchans[which], e);
- if (e->e != PRI_EVENT_DCHAN_DOWN)
+
+ if (e->e != PRI_EVENT_DCHAN_DOWN) {
+ if (!(pri->dchanavail[which] & DCHAN_UP)) {
+ ast_verb(2, "%s D-Channel on span %d up\n", pri_order(which), pri->span);
+ }
pri->dchanavail[which] |= DCHAN_UP;
+ } else {
+ if (pri->dchanavail[which] & DCHAN_UP) {
+ ast_verb(2, "%s D-Channel on span %d down\n", pri_order(which), pri->span);
+ }
+ pri->dchanavail[which] &= ~DCHAN_UP;
+ }
if ((e->e != PRI_EVENT_DCHAN_UP) && (e->e != PRI_EVENT_DCHAN_DOWN) && (pri->pri != pri->dchans[which]))
/* Must be an NFAS group that has the secondary dchan active */
@@ -10308,8 +10318,6 @@ static void *pri_dchannel(void *vpri)
switch (e->e) {
case PRI_EVENT_DCHAN_UP:
- ast_verb(2, "%s D-Channel on span %d up\n", pri_order(which), pri->span);
- pri->dchanavail[which] |= DCHAN_UP;
if (!pri->pri) pri_find_dchan(pri);
/* Note presense of D-channel */
@@ -10328,8 +10336,6 @@ static void *pri_dchannel(void *vpri)
}
break;
case PRI_EVENT_DCHAN_DOWN:
- ast_verb(2, "%s D-Channel on span %d down\n", pri_order(which), pri->span);
- pri->dchanavail[which] &= ~DCHAN_UP;
pri_find_dchan(pri);
if (!pri_is_up(pri)) {
pri->resetting = 0;