diff options
-rwxr-xr-x | asterisk.c | 1 | ||||
-rwxr-xr-x | channel.c | 1 | ||||
-rwxr-xr-x | channels/chan_zap.c | 8 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 4 | ||||
-rwxr-xr-x | manager.c | 1 | ||||
-rwxr-xr-x | res/res_agi.c | 1 |
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> @@ -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" { @@ -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> |