]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Disable echo canceller for digital calls (bug #2785), fix build on MacOSX (bug #2803)
authorMark Spencer <markster@digium.com>
Sun, 7 Nov 2004 16:21:01 +0000 (16:21 +0000)
committerMark Spencer <markster@digium.com>
Sun, 7 Nov 2004 16:21:01 +0000 (16:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4170 65c4cc65-6c06-0410-ace0-fbb531ad65f3

asterisk.c
channel.c
channels/chan_zap.c
include/asterisk/channel.h
manager.c
res/res_agi.c

index f74d0acb25339c968952452a4dff218eafdb35f9..690ab90c50fecfb29b9969789137a145ae6f1ea9 100755 (executable)
@@ -13,7 +13,6 @@
 
 #include <unistd.h>
 #include <stdlib.h>
-#include <sys/poll.h>
 #include <asterisk/logger.h>
 #include <asterisk/options.h>
 #include <asterisk/cli.h>
index 2b9c877bfbb8b28cff42f08159694133bece8ea0..004468a62ac89b285ec8de2fe575ee5301fc494e 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -19,7 +19,6 @@
 #include <errno.h>
 #include <unistd.h>
 #include <math.h>                      /* For PI */
-#include <sys/poll.h>
 #include <asterisk/pbx.h>
 #include <asterisk/frame.h>
 #include <asterisk/sched.h>
index 4644bf0956e38792cf3bc51061211f658f909909..2a8b95d740cc6e4e6f2e9caebe020e777022ab83 100755 (executable)
@@ -1213,11 +1213,17 @@ static void zt_enable_ec(struct zt_pvt *p)
 {
        int x;
        int res;
+       if (!p)
+               return;
        if (p->echocanon) {
                ast_log(LOG_DEBUG, "Echo cancellation already on\n");
                return;
        }
-       if (p && p->echocancel) {
+       if (p->digital) {
+               ast_log(LOG_DEBUG, "Echo cancellation isn't required on digital connection\n");
+               return;
+       }
+       if (p->echocancel) {
                if (p->sig == SIG_PRI) {
                        x = 1;
                        res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &x);
index 6b514befe36807a9da6d053e6c9a9010f69597da..f78c3c15896d4337ee3ee572e3927214edacecce 100755 (executable)
 #include <asterisk/chanvars.h>
 #include <unistd.h>
 #include <setjmp.h>
+#if defined(__APPLE__)
+#include <asterisk/poll-compat.h>
+#else
 #include <sys/poll.h>
+#endif
 
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
index a1935ede3497210a1acccf56d8ee88668ef3688a..7bfccaa33b3077a093b17d3d6d3a06f22c080bfe 100755 (executable)
--- a/manager.c
+++ b/manager.c
@@ -24,7 +24,6 @@
 #include <signal.h>
 #include <errno.h>
 #include <unistd.h>
-#include <sys/poll.h>
 #include <asterisk/channel.h>
 #include <asterisk/file.h>
 #include <asterisk/manager.h>
index b6f6edebb8066d31478f76fc16b9ff721725cfdf..a0813289a1221f687fa06813ccd1f67faccb67d0 100755 (executable)
@@ -31,7 +31,6 @@
 #include <stdlib.h>
 #include <signal.h>
 #include <sys/time.h>
-#include <sys/poll.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>