summaryrefslogtreecommitdiff
path: root/drivers/dahdi
diff options
context:
space:
mode:
authorDoug Bailey <dbailey@digium.com>2009-01-22 15:42:38 +0000
committerDoug Bailey <dbailey@digium.com>2009-01-22 15:42:38 +0000
commitfbcb5a03be8fadf9dc6c823145644a109a72c011 (patch)
tree82937d46556a0b934f3488eb8fb573134ce8d1c0 /drivers/dahdi
parentcbf9ffd7cf52334adcc3574a92f571153589bed2 (diff)
Change structure passed in DAHDI_VMWI ioctl call to make it so new VMWI types do not break the ioctl call
Remove FSK and RPAS from the VMWI types as no driver implemented them and the functionality is in chan_dahdi. (issue #14104) Reported by: alecdavis Patches: mwiioctl_structure_dahdi.diff4.txt uploaded by dbailey (license ) Tested by: alecdavis, dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5799 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-rw-r--r--drivers/dahdi/wctdm.c6
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index cc32a9f..9d43833 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -1847,9 +1847,9 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
return -EFAULT;
if (wc->mod[chan->chanpos - 1].fxs.vmwisetting.messages){
- wc->mod[chan->chanpos - 1].fxs.vmwi_lrev = (wc->mod[chan->chanpos - 1].fxs.vmwisetting.linereverse)?1:0;
- wc->mod[chan->chanpos - 1].fxs.vmwi_hvdc = (wc->mod[chan->chanpos - 1].fxs.vmwisetting.hvdc)?1:0;
- wc->mod[chan->chanpos - 1].fxs.vmwi_hvac = (wc->mod[chan->chanpos - 1].fxs.vmwisetting.hvac)?1:0;
+ wc->mod[chan->chanpos - 1].fxs.vmwi_lrev = (wc->mod[chan->chanpos - 1].fxs.vmwisetting.vmwi_type & DAHDI_VMWI_LREV)?1:0;
+ wc->mod[chan->chanpos - 1].fxs.vmwi_hvdc = (wc->mod[chan->chanpos - 1].fxs.vmwisetting.vmwi_type & DAHDI_VMWI_HVDC)?1:0;
+ wc->mod[chan->chanpos - 1].fxs.vmwi_hvac = (wc->mod[chan->chanpos - 1].fxs.vmwisetting.vmwi_type & DAHDI_VMWI_HVAC)?1:0;
} else {
wc->mod[chan->chanpos - 1].fxs.vmwi_lrev = 0;
wc->mod[chan->chanpos - 1].fxs.vmwi_hvdc = 0;
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 847b9f4..0f87ea7 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -2450,7 +2450,7 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
if (copy_from_user(&(wc->mods[chan->chanpos - 1].fxs.vmwisetting), (__user void *) data, sizeof(wc->mods[chan->chanpos - 1].fxs.vmwisetting)))
return -EFAULT;
- if (wc->mods[chan->chanpos - 1].fxs.vmwisetting.messages && wc->mods[chan->chanpos - 1].fxs.vmwisetting.linereverse){
+ if (wc->mods[chan->chanpos - 1].fxs.vmwisetting.messages && wc->mods[chan->chanpos - 1].fxs.vmwisetting.vmwi_type & DAHDI_VMWI_LREV){
wc->mods[chan->chanpos - 1].fxs.linereverse_mwi = 1;
} else {
wc->mods[chan->chanpos - 1].fxs.linereverse_mwi = 0;