[asterisk-commits] mattf: branch 1.4 r63654 - in /branches/1.4: ./
channels/chan_zap.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed May 9 10:25:21 MST 2007
Author: mattf
Date: Wed May 9 12:25:21 2007
New Revision: 63654
URL: http://svn.digium.com/view/asterisk?view=rev&rev=63654
Log:
Merged revisions 63653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r63653 | mattf | 2007-05-09 12:20:20 -0500 (Wed, 09 May 2007) | 2 lines
Make sure we only create a DSP if it's requested on SUB_REAL
........
Modified:
branches/1.4/ (props changed)
branches/1.4/channels/chan_zap.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_zap.c?view=diff&rev=63654&r1=63653&r2=63654
==============================================================================
--- branches/1.4/channels/chan_zap.c (original)
+++ branches/1.4/channels/chan_zap.c Wed May 9 12:25:21 2007
@@ -5216,26 +5216,28 @@
i->subs[index].linear = 0;
zt_setlinear(i->subs[index].zfd, i->subs[index].linear);
features = 0;
- if (i->busydetect && CANBUSYDETECT(i))
- features |= DSP_FEATURE_BUSY_DETECT;
- if ((i->callprogress & 1) && CANPROGRESSDETECT(i))
- features |= DSP_FEATURE_CALL_PROGRESS;
- if ((!i->outgoing && (i->callprogress & 4)) ||
- (i->outgoing && (i->callprogress & 2))) {
- features |= DSP_FEATURE_FAX_DETECT;
- }
+ if (index == SUB_REAL) {
+ if (i->busydetect && CANBUSYDETECT(i))
+ features |= DSP_FEATURE_BUSY_DETECT;
+ if ((i->callprogress & 1) && CANPROGRESSDETECT(i))
+ features |= DSP_FEATURE_CALL_PROGRESS;
+ if ((!i->outgoing && (i->callprogress & 4)) ||
+ (i->outgoing && (i->callprogress & 2))) {
+ features |= DSP_FEATURE_FAX_DETECT;
+ }
#ifdef ZT_TONEDETECT
- x = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE;
- if (ioctl(i->subs[index].zfd, ZT_TONEDETECT, &x)) {
+ x = ZT_TONEDETECT_ON | ZT_TONEDETECT_MUTE;
+ if (ioctl(i->subs[index].zfd, ZT_TONEDETECT, &x)) {
#endif
- i->hardwaredtmf = 0;
- features |= DSP_FEATURE_DTMF_DETECT;
+ i->hardwaredtmf = 0;
+ features |= DSP_FEATURE_DTMF_DETECT;
#ifdef ZT_TONEDETECT
- } else if (NEED_MFDETECT(i)) {
- i->hardwaredtmf = 1;
- features |= DSP_FEATURE_DTMF_DETECT;
- }
+ } else if (NEED_MFDETECT(i)) {
+ i->hardwaredtmf = 1;
+ features |= DSP_FEATURE_DTMF_DETECT;
+ }
#endif
+ }
if (features) {
if (i->dsp) {
ast_log(LOG_DEBUG, "Already have a dsp on %s?\n", tmp->name);
More information about the asterisk-commits
mailing list