ports/net/asterisk16/files/patch-channels-chan_dahdi.c
Guido Falsi 9b8e085afc - Add asterisk 16.0.0 to ports
- Update g72x module to 1.4.3, which add support for asterisk 16
- Add asterisk16 flavor and conflicts to asterisk modules ports
  which support it
- Add conflicts to other asterisk versions ports
- Add deprecation notice to asterisk15 which will reach EOL on
  2019-10-03
- Fix wording on SOUNDS option description
- Remove old MOVED line for asterisk16 which was for the long removed
  asterisk 1.6 version

Approved by:	portmgr (flavors already approved in the past)
2018-10-31 23:42:52 +00:00

33 lines
1.2 KiB
C

--- channels/chan_dahdi.c.orig 2018-08-08 16:02:31 UTC
+++ channels/chan_dahdi.c
@@ -4599,6 +4599,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)
@@ -4629,7 +4631,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 {
@@ -4663,8 +4667,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));