mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
3218099f1b
Note that branch 15 is NOT a Long Term Support branch. Asterisk 15 will reach EOL before Asterisk 13. Requested by: "Herbert J. Skuhra" <herbert@gojira.at> (thanks for help testing)
34 lines
1.2 KiB
C
34 lines
1.2 KiB
C
--- channels/chan_dahdi.c.orig 2017-12-20 20:39:39 UTC
|
|
+++ channels/chan_dahdi.c
|
|
@@ -4589,6 +4589,8 @@ void dahdi_ec_enable(struct dahdi_pvt *p)
|
|
return;
|
|
}
|
|
if (p->echocancel.head.tap_length) {
|
|
+ struct dahdi_echocanparams *pecp;
|
|
+
|
|
#if defined(HAVE_PRI) || defined(HAVE_SS7)
|
|
switch (p->sig) {
|
|
#if defined(HAVE_PRI)
|
|
@@ -4619,7 +4621,9 @@ void dahdi_ec_enable(struct dahdi_pvt *p)
|
|
break;
|
|
}
|
|
#endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
|
|
- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &p->echocancel);
|
|
+
|
|
+ pecp = &p->echocancel.head;
|
|
+ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
|
|
if (res) {
|
|
ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d (%s)\n", p->channel, strerror(errno));
|
|
} else {
|
|
@@ -4653,8 +4657,9 @@ void dahdi_ec_disable(struct dahdi_pvt *p)
|
|
|
|
if (p->echocanon) {
|
|
struct dahdi_echocanparams ecp = { .tap_length = 0 };
|
|
+ struct dahdi_echocanparams *pecp = &ecp;
|
|
|
|
- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &ecp);
|
|
+ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
|
|
|
|
if (res)
|
|
ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));
|