diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-08-25 16:31:06 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-08-25 16:31:06 +0000 |
commit | 9e50b34e243523ae378d4a71edfa1c1ea38ddd8a (patch) | |
tree | ece9cc2a166dc7ccb76f4c3ac4d465fd70374c11 | |
parent | be09262c915dc615563ae10ab34f8ef9bc1b1249 (diff) |
Handle unload with digitalmon properly (bug #2299)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@452 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | zaptel.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1545,8 +1545,9 @@ static void zt_chan_unreg(struct zt_chan *chan) chans[x]->master = chans[x]; } if ((chans[x]->confna == chan->channo) && - (chans[x]->confmode >= ZT_CONF_MONITOR) && - (chans[x]->confmode <= ZT_CONF_MONITORBOTH)) { + (((chans[x]->confmode >= ZT_CONF_MONITOR) && + (chans[x]->confmode <= ZT_CONF_MONITORBOTH)) || + (chans[x]->confmode == ZT_CONF_DIGITALMON))) { /* Take them out of conference with us */ /* release conference resource if any */ if (chans[x]->confna) @@ -4613,6 +4614,8 @@ static inline void __zt_process_getaudio_chunk(struct zt_chan *ss, unsigned char break; case ZT_CONF_DIGITALMON: /* Real digital monitoring, but still echo cancel if desired */ + if (!chans[ms->confna]) + break; if (chans[ms->confna]->flags & ZT_FLAG_PSEUDO) { if (ms->ec) { for (x=0;x<ZT_CHUNKSIZE;x++) |