From 3e7f205d31b7893ed7cdebf5826b3f24ec810554 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 14 May 2008 15:53:02 +0000 Subject: [PATCH] make echo stuff failure nonfatal git-svn-id: http://svn.openzap.org/svn/openzap/trunk@476 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/.update | 2 +- libs/openzap/src/zap_zt.c | 22 ++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/libs/openzap/.update b/libs/openzap/.update index aee0582972..b7c238bea5 100644 --- a/libs/openzap/.update +++ b/libs/openzap/.update @@ -1 +1 @@ -Wed May 14 11:20:37 EDT 2008 +Wed May 14 11:24:37 EDT 2008 diff --git a/libs/openzap/src/zap_zt.c b/libs/openzap/src/zap_zt.c index afcf3ca968..ec6872b782 100644 --- a/libs/openzap/src/zap_zt.c +++ b/libs/openzap/src/zap_zt.c @@ -346,16 +346,18 @@ static ZIO_OPEN_FUNCTION(zt_open) } else if (zchan->type == ZAP_CHAN_TYPE_FXS || zchan->type == ZAP_CHAN_TYPE_FXO) { int len = zt_globals.eclevel; if (ioctl(zchan->sockfd, ZT_ECHOCANCEL, &len)) { - snprintf(zchan->last_error, sizeof(zchan->last_error), "%s", strerror(errno)); - zap_log(ZAP_LOG_ERROR, "%s\n", zchan->last_error); - return ZAP_FAIL; - } - - len = zt_globals.etlevel; - if (ioctl(zchan->sockfd, ZT_ECHOTRAIN, &len)) { - snprintf(zchan->last_error, sizeof(zchan->last_error), "%s", strerror(errno)); - zap_log(ZAP_LOG_ERROR, "%s\n", zchan->last_error); - return ZAP_FAIL; + zap_log(ZAP_LOG_WARNING, "Echo cancel not available for %d:%d\n", zchan->span_id, zchan->chan_id); + //snprintf(zchan->last_error, sizeof(zchan->last_error), "%s", strerror(errno)); + //zap_log(ZAP_LOG_ERROR, "%s\n", zchan->last_error); + //return ZAP_FAIL; + } else { + len = zt_globals.etlevel; + if (ioctl(zchan->sockfd, ZT_ECHOTRAIN, &len)) { + zap_log(ZAP_LOG_WARNING, "Echo training not available for %d:%d\n", zchan->span_id, zchan->chan_id); + //snprintf(zchan->last_error, sizeof(zchan->last_error), "%s", strerror(errno)); + //zap_log(ZAP_LOG_ERROR, "%s\n", zchan->last_error); + //return ZAP_FAIL; + } } } }