summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm.c
diff options
context:
space:
mode:
authorDoug Bailey <dbailey@digium.com>2009-01-19 18:18:12 +0000
committerDoug Bailey <dbailey@digium.com>2009-01-19 18:18:12 +0000
commit165680e91300531d30deb3319ec9376d372b5d4a (patch)
treeed46b9e23b51fbf74d3f4900bf2e407720d03d41 /drivers/dahdi/wctdm.c
parent18206962fec77d303798d9756f47369de84868c5 (diff)
Add mask for portion of DAHDI_VMWI ioctl call that carries the number of messages pending.
Remove magic number from code. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5746 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm.c')
-rw-r--r--drivers/dahdi/wctdm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index 2d92a80..d4c94e9 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -1848,8 +1848,8 @@ static int wctdm_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long
if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS)
return -EINVAL;
- wc->mod[chan->chanpos - 1].fxs.vmwimessages = (x & 255);
- wc->mod[chan->chanpos - 1].fxs.mwisendtype = (x & ~255);
+ wc->mod[chan->chanpos - 1].fxs.vmwimessages = (x & DAHDI_VMWI_NUMBER_MASK);
+ wc->mod[chan->chanpos - 1].fxs.mwisendtype = (x & ~ DAHDI_VMWI_NUMBER_MASK);
if (wc->mod[chan->chanpos - 1].fxs.vmwimessages){
x = wc->mod[chan->chanpos - 1].fxs.mwisendtype;
wc->mod[chan->chanpos - 1].fxs.vmwi_lrev = (x & DAHDI_VMWI_LREV)?1:0;