summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xasterisk.c1
-rwxr-xr-xchannel.c1
-rwxr-xr-xchannels/chan_zap.c8
-rwxr-xr-xinclude/asterisk/channel.h4
-rwxr-xr-xmanager.c1
-rwxr-xr-xres/res_agi.c1
6 files changed, 11 insertions, 5 deletions
diff --git a/asterisk.c b/asterisk.c
index f74d0acb2..690ab90c5 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -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>
diff --git a/channel.c b/channel.c
index 2b9c877bf..004468a62 100755
--- 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>
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 4644bf095..2a8b95d74 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -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);
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 6b514befe..f78c3c158 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -19,7 +19,11 @@
#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" {
diff --git a/manager.c b/manager.c
index a1935ede3..7bfccaa33 100755
--- 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>
diff --git a/res/res_agi.c b/res/res_agi.c
index b6f6edebb..a0813289a 100755
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -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>