summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2012-03-16 16:11:38 +0000
committerShaun Ruffell <sruffell@digium.com>2012-03-16 16:11:38 +0000
commit261097576ff97261eb28ac3b2982c281cc4da1ec (patch)
treefc8a25e492e6263416b12ebaec8e3cacf5795b8d
parent39f44d0380658c6f2422553d71aec1475a3eeb6c (diff)
wctdm24xxp: Fix bug if hook state on FXS changes before channel configuration.
If the hook state on an FXS port changes before the channel is configured with dahdi_cfg it is possible to erroneously force the line feed register open without setting a timer to clear it. The result would be a "dead" channel that cannot be cleared unless the driver is reloaded and warning in the kernel log that "0 is an invalid signaling state for an FXS module". This change makes the OFF_HOOK to ON_HOOK change behave just as the ON_HOOK to OFF_HOOK change has. Internal-Issue-ID: DAHLIN-272 Reported-and-Tested-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10396 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10527 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 70226fa..95f64ea 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -1986,20 +1986,16 @@ wctdm_fxs_hooksig(struct wctdm *wc, struct wctdm_module *const mod,
switch (txsig) {
case DAHDI_TXSIG_ONHOOK:
switch (get_dahdi_chan(wc, mod)->sig) {
- case DAHDI_SIG_EM:
- case DAHDI_SIG_FXOKS:
- case DAHDI_SIG_FXOLS:
- x = fxs->idletxhookstate;
- break;
case DAHDI_SIG_FXOGS:
x = (POLARITY_XOR(fxs)) ?
SLIC_LF_RING_OPEN :
SLIC_LF_TIP_OPEN;
break;
+ case DAHDI_SIG_EM:
+ case DAHDI_SIG_FXOKS:
+ case DAHDI_SIG_FXOLS:
default:
- WARN_ONCE(1, "%x is an invalid signaling state for "
- "an FXS module.\n",
- get_dahdi_chan(wc, mod)->sig);
+ x = fxs->idletxhookstate;
break;
}
break;