[dahdi-commits] dbailey: linux/trunk r5799 - in /linux/trunk: drivers/dahdi/ drivers/dahdi/wc...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Jan 22 09:42:39 CST 2009


Author: dbailey
Date: Thu Jan 22 09:42:38 2009
New Revision: 5799

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5799
Log:
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

Modified:
    linux/trunk/drivers/dahdi/wctdm.c
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/include/dahdi/user.h

Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=5799&r1=5798&r2=5799
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Thu Jan 22 09:42:38 2009
@@ -1847,9 +1847,9 @@
 			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;

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=5799&r1=5798&r2=5799
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Thu Jan 22 09:42:38 2009
@@ -2450,7 +2450,7 @@
 		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; 

Modified: linux/trunk/include/dahdi/user.h
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/include/dahdi/user.h?view=diff&rev=5799&r1=5798&r2=5799
==============================================================================
--- linux/trunk/include/dahdi/user.h (original)
+++ linux/trunk/include/dahdi/user.h Thu Jan 22 09:42:38 2009
@@ -971,12 +971,12 @@
  */
 struct dahdi_vmwi_info {
 	unsigned int messages;	/* Number of messages pending */
-	unsigned char fsk;	/* default FSK, */
-	unsigned char rpas;	/* Ring Pulse Alert Signal precedes the FSK spill */
-	unsigned char linereverse;	/* Line reversal message indicator */
-	unsigned char hvdc;	/* Line reversal message indicator */
-	unsigned char hvac;	/* Line reversal message indicator */
-};
+	unsigned int vmwi_type; 
+};
+
+#define DAHDI_VMWI_LREV	(1 << 0)	/* Line Reversal */
+#define DAHDI_VMWI_HVDC	(1 << 1)	/* HV 90VDC */
+#define DAHDI_VMWI_HVAC	(1 << 2)	/* HV 90VAC Neon lamp */
 
 /*
  * VoiceMail Waiting Indication (VMWI) -- implemented by low-level driver.




More information about the dahdi-commits mailing list