tweak on last commit

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@1071 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2010-03-19 19:00:02 +00:00
parent 28561b8867
commit efe0bdede7
1 changed files with 9 additions and 3 deletions

View File

@ -631,12 +631,18 @@ static ZIO_OPEN_FUNCTION(zt_open)
}
}
if (zt_globals.eclevel > 0) {
if (zt_globals.eclevel >= 0) {
int len = zt_globals.eclevel;
if (len) {
zap_log(ZAP_LOG_INFO, "Setting echo cancel to %d taps for %d:%d\n", len, zchan->span_id, zchan->chan_id);
} else {
zap_log(ZAP_LOG_INFO, "Disable echo cancel for %d:%d\n", zchan->span_id, zchan->chan_id);
}
if (ioctl(zchan->sockfd, codes.ECHOCANCEL, &len)) {
zap_log(ZAP_LOG_WARNING, "Echo cancel not available for %d:%d\n", zchan->span_id, zchan->chan_id);
} else if (zt_globals.etlevel > 0) {
} else if (zt_globals.etlevel >= 0) {
len = zt_globals.etlevel;
if (ioctl(zchan->sockfd, codes.ECHOTRAIN, &len)) {
zap_log(ZAP_LOG_WARNING, "Echo training not available for %d:%d\n", zchan->span_id, zchan->chan_id);