aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 22:33:27 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-18 22:33:27 +0000
commitb628d71ddf4bfb3d5c6a06863b0ef676178acdda (patch)
tree60abd16740f478b6ef1961a2eee82676685519b4 /channels/chan_zap.c
parent71aeddffbe095d3264fc184e59af113663cfd704 (diff)
Merged revisions 103795 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103795 | qwell | 2008-02-18 16:28:56 -0600 (Mon, 18 Feb 2008) | 1 line Fix previous commit so that we actually disable echocanbridged if echocancel is off. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103796 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r--channels/chan_zap.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index a51e01920..1fe7c95f3 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -8366,7 +8366,17 @@ static struct zt_pvt *mkintf(int channel, struct zt_chan_conf conf, struct zt_pr
tmp->echocancel = conf.chan.echocancel;
tmp->echotraining = conf.chan.echotraining;
tmp->pulse = conf.chan.pulse;
- tmp->echocanbridged = conf.chan.echocanbridged;
+#if defined(HAVE_ZAPTEL_ECHOCANPARAMS)
+ if (tmp->echocancel.head.tap_length) {
+#else
+ if (tmp->echocancel) {
+#endif
+ tmp->echocanbridged = conf.chan.echocanbridged;
+ } else {
+ if (conf.chan.echocanbridged)
+ ast_log(LOG_NOTICE, "echocancelwhenbridged requires echocancel to be enabled; ignoring\n");
+ tmp->echocanbridged = 0;
+ }
tmp->busydetect = conf.chan.busydetect;
tmp->busycount = conf.chan.busycount;
tmp->busy_tonelength = conf.chan.busy_tonelength;
@@ -11865,14 +11875,14 @@ static char *zap_show_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_a
for (x = 0; x < tmp->echocancel.head.param_count; x++) {
ast_cli(a->fd, "\t\t%s: %ud\n", tmp->echocancel.params[x].name, tmp->echocancel.params[x].value);
}
- ast_cli(a->fd, "\t%scurrently %s\n", (!tmp->echocanon || tmp->echocanbridged) ? "" : "(unless TDM bridged) ", tmp->echocanon ? "ON" : "OFF");
+ ast_cli(a->fd, "\t%scurrently %s\n", tmp->echocanbridged ? "" : "(unless TDM bridged) ", tmp->echocanon ? "ON" : "OFF");
} else {
ast_cli(a->fd, "\tnone\n");
}
#else
if (tmp->echocancel) {
ast_cli(a->fd, "\t%d taps\n", tmp->echocancel);
- ast_cli(a->fd, "\t%scurrently %s\n", (!tmp->echocanon || tmp->echocanbridged) ? "" : "(unless TDM bridged) ", tmp->echocanon ? "ON" : "OFF");
+ ast_cli(a->fd, "\t%scurrently %s\n", tmp->echocanbridged ? "" : "(unless TDM bridged) ", tmp->echocanon ? "ON" : "OFF");
}
else
ast_cli(a->fd, "\tnone\n");