[zaptel-commits] tzafrir: branch 1.2 r4314 - in /branches/1.2/xpp: xpd.h xpp_zap.c

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Thu May 22 09:56:11 CDT 2008


Author: tzafrir
Date: Thu May 22 09:56:10 2008
New Revision: 4314

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4314
Log:
blink_mode was a boolean and changed to a channels bitmask. Now actually
changing the type from bool to unsigned long. (xpp r5756).

Modified:
    branches/1.2/xpp/xpd.h
    branches/1.2/xpp/xpp_zap.c

Modified: branches/1.2/xpp/xpd.h
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpd.h?view=diff&rev=4314&r1=4313&r2=4314
==============================================================================
--- branches/1.2/xpp/xpd.h (original)
+++ branches/1.2/xpp/xpd.h Thu May 22 09:56:10 2008
@@ -171,7 +171,7 @@
 	atomic_t	open_counter;	/* Number of open channels */
 
 	int		flags;
-	bool		blink_mode;	/* for visual identification */
+	unsigned long	blink_mode;	/* bitmask of blinking ports */
 #define	DEFAULT_LED_PERIOD	(1000/8)	/* in tick */
 
 #ifdef CONFIG_PROC_FS

Modified: branches/1.2/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_zap.c?view=diff&rev=4314&r1=4313&r2=4314
==============================================================================
--- branches/1.2/xpp/xpp_zap.c (original)
+++ branches/1.2/xpp/xpp_zap.c Thu May 22 09:56:10 2008
@@ -622,7 +622,7 @@
 	BUG_ON(!xpd);
 	spin_lock_irqsave(&xpd->lock, flags);
 
-	len += sprintf(page + len, "%d\n", xpd->blink_mode);
+	len += sprintf(page + len, "0x%lX\n", xpd->blink_mode);
 	spin_unlock_irqrestore(&xpd->lock, flags);
 	if (len <= off+count)
 		*eof = 1;
@@ -640,7 +640,7 @@
 	xpd_t		*xpd = data;
 	char		buf[MAX_PROC_WRITE];
 	char		*endp;
-	unsigned	blink;
+	unsigned long	blink;
 
 
 	BUG_ON(!xpd);
@@ -654,7 +654,7 @@
 	blink = simple_strtoul(buf, &endp, 0);
 	if(*endp != '\0' || blink > 0xFFFF)
 		return -EINVAL;
-	XPD_DBG(GENERAL, xpd, "BLINK channels: 0x%X\n", blink);
+	XPD_DBG(GENERAL, xpd, "BLINK channels: 0x%lX\n", blink);
 	xpd->blink_mode = blink;
 	return count;
 }




More information about the zaptel-commits mailing list