[dahdi-commits] sruffell: linux/trunk r6803 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Jun 30 12:27:37 CDT 2009
Author: sruffell
Date: Tue Jun 30 12:27:34 2009
New Revision: 6803
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6803
Log:
echocan: Do not go into PRETRAINING mode if not supported by the echocan.
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=6803&r1=6802&r2=6803
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Jun 30 12:27:34 2009
@@ -5272,14 +5272,18 @@
if ((j < 0) || (j >= DAHDI_MAX_PRETRAINING))
return -EINVAL;
j <<= 3;
+ spin_lock_irqsave(&chan->lock, flags);
if (chan->ec_state) {
/* Start pretraining stage */
- spin_lock_irqsave(&chan->lock, flags);
- chan->ec_state->status.mode = ECHO_MODE_PRETRAINING;
- chan->ec_state->status.pretrain_timer = j;
+ if (chan->ec_state->ops->echocan_traintap) {
+ chan->ec_state->status.mode = ECHO_MODE_PRETRAINING;
+ chan->ec_state->status.pretrain_timer = j;
+ }
spin_unlock_irqrestore(&chan->lock, flags);
- } else
+ } else {
+ spin_unlock_irqrestore(&chan->lock, flags);
return -EINVAL;
+ }
break;
case DAHDI_ECHOCANCEL_FAX_MODE:
if (!chan->ec_state) {
More information about the dahdi-commits
mailing list