[svn-commits] sruffell: linux/trunk r10000 - in /linux/trunk/include/dahdi: kernel.h user.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 29 10:32:44 CDT 2011


Author: sruffell
Date: Wed Jun 29 10:32:40 2011
New Revision: 10000

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10000
Log:
Revert "dahdi: Use enumeration for maintenance modes."

This reverts commit r9879. Asterisk commit r264249 [1], which was committed
after the switch to enumerations, requires the maintenance modes to be

Changing the test in configure.ac from:

AST_C_DEFINE_CHECK([DAHDI], [DAHDI_RESET_COUNTERS], [dahdi/user.h], [230])

to:

AST_C_COMPILE_CHECK([DAHDI], [int foo = DAHDI_RESET_COUNTERS], [dahdi/user.h])

Would allow the maintenance modes to stand as enumerations but the potential
for users to run incompatible versions does not seem worth it at this point.

[1] http://svnview.digium.com/svn/asterisk?view=revision&revision=264249

Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

Modified:
    linux/trunk/include/dahdi/kernel.h
    linux/trunk/include/dahdi/user.h

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=10000&r1=9999&r2=10000
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Wed Jun 29 10:32:40 2011
@@ -906,7 +906,7 @@
 	int syncsrc;			/*!< current sync src (gets copied here) */
 	struct dahdi_count count;	/*!< Performance and Error counters */
 
-	enum dahdi_maint_mode maintstat; /*!< Maintenance state */
+	int maintstat;			/*!< Maintenance state */
 	int mainttimer;			/*!< Maintenance timer */
 
 	int irqmisses;			/*!< Interrupt misses */

Modified: linux/trunk/include/dahdi/user.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/user.h?view=diff&rev=10000&r1=9999&r2=10000
==============================================================================
--- linux/trunk/include/dahdi/user.h (original)
+++ linux/trunk/include/dahdi/user.h Wed Jun 29 10:32:40 2011
@@ -327,24 +327,23 @@
 #define DAHDI_ALARM_LFA			(1 << 9) /* Loss of Frame Alignment */
 #define DAHDI_ALARM_LMFA		(1 << 10)/* Loss of Multi-Frame Align */
 
-enum dahdi_maint_mode {
-	DAHDI_MAINT_NONE		= 0,	/* Normal Mode */
-	DAHDI_MAINT_LOCALLOOP		= 1,	/* Local Loopback */
-	DAHDI_MAINT_REMOTELOOP		= 2,	/* Remote Loopback */
-	DAHDI_MAINT_NETWORKLINELOOP	= 2,	/* Remote Loopback */
-	DAHDI_MAINT_LOOPUP		= 3,	/* send loopup code */
-	DAHDI_MAINT_LOOPDOWN		= 4,	/* send loopdown code */
-	DAHDI_MAINT_FAS_DEFECT		= 6,	/* insert a FAS defect */
-	DAHDI_MAINT_MULTI_DEFECT	= 7,	/* insert a Multiframe defect */
-	DAHDI_MAINT_CRC_DEFECT		= 8,	/* insert a FAS defect */
-	DAHDI_MAINT_CAS_DEFECT		= 9,	/* insert a FAS defect */
-	DAHDI_MAINT_PRBS_DEFECT		= 10,	/* insert a FAS defect */
-	DAHDI_MAINT_BIPOLAR_DEFECT	= 11,	/* insert a FAS defect */
-	DAHDI_MAINT_PRBS		= 12,	/* enable the PRBS gen/mon */
-	DAHDI_MAINT_NETWORKPAYLOADLOOP	= 13,	/* Remote Loopback */
-	DAHDI_RESET_COUNTERS		= 14,	/* Clear the error counters */
-	DAHDI_MAINT_ALARM_SIM		= 15,	/* Simulate alarms */
-};
+/* Maintenance modes */
+#define DAHDI_MAINT_NONE		0	/* Normal Mode */
+#define DAHDI_MAINT_LOCALLOOP		1	/* Local Loopback */
+#define DAHDI_MAINT_REMOTELOOP		2	/* Remote Loopback */
+#define DAHDI_MAINT_NETWORKLINELOOP	2	/* Remote Loopback */
+#define DAHDI_MAINT_LOOPUP		3	/* send loopup code */
+#define DAHDI_MAINT_LOOPDOWN		4	/* send loopdown code */
+#define DAHDI_MAINT_FAS_DEFECT		6	/* insert a FAS defect */
+#define DAHDI_MAINT_MULTI_DEFECT	7	/* insert a Multiframe defect */
+#define DAHDI_MAINT_CRC_DEFECT		8	/* insert a FAS defect */
+#define DAHDI_MAINT_CAS_DEFECT		9	/* insert a FAS defect */
+#define DAHDI_MAINT_PRBS_DEFECT		10	/* insert a FAS defect */
+#define DAHDI_MAINT_BIPOLAR_DEFECT	11	/* insert a FAS defect */
+#define DAHDI_MAINT_PRBS		12	/* enable the PRBS gen/mon */
+#define DAHDI_MAINT_NETWORKPAYLOADLOOP	13	/* Remote Loopback */
+#define DAHDI_RESET_COUNTERS		14	/* Clear the error counters */
+#define DAHDI_MAINT_ALARM_SIM		15	/* Simulate alarms */
 
 /* Flag Value for IOMUX, read avail */
 #define DAHDI_IOMUX_READ	1




More information about the svn-commits mailing list