From 0db1114c4dbff1b553e903b483f14428bf670dee Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Thu, 26 Mar 2009 18:02:31 +0000 Subject: when /etc/dahdi/system.conf does not have an echo canceller defined for a channel, but the channel previously had one assigned, running dahdi_cfg does not remove the assigned echo canceller from the channel as it should. this commit changes that behavior, so that every channel with a defined signaling mode is updated to have the proper (or no) echo canceller assigned. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6259 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- dahdi_cfg.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/dahdi_cfg.c b/dahdi_cfg.c index 27d39ad..8f0dd0a 100644 --- a/dahdi_cfg.c +++ b/dahdi_cfg.c @@ -723,8 +723,7 @@ static int setechocan(char *keyword, char *args) for (x = 0; x < DAHDI_MAX_CHANNELS; x++) { if (chans[x]) { - ae[x].chan = x; - dahdi_copy_string(ae[x].echocan, echocan, sizeof(ae[0].echocan)); + dahdi_copy_string(ae[x].echocan, echocan, sizeof(ae[x].echocan)); } } @@ -1304,9 +1303,7 @@ static void printconfig(int fd) printf("Channel %02d %s to %02d", x, sig[x], cc[x].idlebits); else { printf("Channel %02d: %s (%s)", x, sig[x], laws[cc[x].deflaw]); - if (ae[x].echocan[0]) { - printf(" (Echo Canceler: %s)", ae[x].echocan); - } + printf(" (Echo Canceler: %s)", ae[x].echocan[0] ? ae[x].echocan : "none"); for (y=1;y