freetdm: only use echo training when value is bigger than zero (fixes silence when using oslec)

This commit is contained in:
Moises Silva 2010-06-29 00:17:48 -04:00
parent da17e2a09e
commit 23efa1ef56
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ static FIO_OPEN_FUNCTION(zt_open)
} }
if (ioctl(ftdmchan->sockfd, codes.ECHOCANCEL, &len)) { if (ioctl(ftdmchan->sockfd, codes.ECHOCANCEL, &len)) {
ftdm_log(FTDM_LOG_WARNING, "Echo cancel not available for %d:%d\n", ftdmchan->span_id, ftdmchan->chan_id); ftdm_log(FTDM_LOG_WARNING, "Echo cancel not available for %d:%d\n", ftdmchan->span_id, ftdmchan->chan_id);
} else if (zt_globals.etlevel >= 0) { } else if (zt_globals.etlevel > 0) {
len = zt_globals.etlevel; len = zt_globals.etlevel;
if (ioctl(ftdmchan->sockfd, codes.ECHOTRAIN, &len)) { if (ioctl(ftdmchan->sockfd, codes.ECHOTRAIN, &len)) {
ftdm_log(FTDM_LOG_WARNING, "Echo training not available for %d:%d\n", ftdmchan->span_id, ftdmchan->chan_id); ftdm_log(FTDM_LOG_WARNING, "Echo training not available for %d:%d\n", ftdmchan->span_id, ftdmchan->chan_id);