[Pcsclite-cvs-commit] r5013 - in /trunk/Drivers/ccid/src: ccid.c ccid.h commands.c ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Jun 17 13:18:45 UTC 2010


Author: rousseau
Date: Thu Jun 17 13:18:42 2010
New Revision: 5013

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5013
Log:
Rename ICCD_A in PROTOCOL_ICCD_A, ICCD_B in PROTOCOL_ICCD_B and add
PROTOCOL_CCID for plain CCID

Modified:
    trunk/Drivers/ccid/src/ccid.c
    trunk/Drivers/ccid/src/ccid.h
    trunk/Drivers/ccid/src/commands.c
    trunk/Drivers/ccid/src/ifdhandler.c

Modified: trunk/Drivers/ccid/src/ccid.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid.c?rev=5013&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid.c (original)
+++ trunk/Drivers/ccid/src/ccid.c Thu Jun 17 13:18:42 2010
@@ -81,7 +81,7 @@
 	}
 
 	/* ICCD type A */
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		unsigned char tmp[MAX_ATR_SIZE];
 		unsigned int n = sizeof(tmp);
@@ -93,7 +93,7 @@
 	}
 
 	/* ICCD type B */
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		unsigned char tmp[MAX_ATR_SIZE];
 		unsigned int n = sizeof(tmp);

Modified: trunk/Drivers/ccid/src/ccid.h
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ccid.h?rev=5013&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ccid.h (original)
+++ trunk/Drivers/ccid/src/ccid.h Thu Jun 17 13:18:42 2010
@@ -155,8 +155,9 @@
 #define CCID_TIME_EXTENSION			0x80	/* 10 0000 00 */
 
 /* bInterfaceProtocol for ICCD */
-#define ICCD_A	1	/* ICCD Version A */
-#define ICCD_B	2	/* ICCD Version B */
+#define PROTOCOL_CCID	0	/* plain CCID */
+#define PROTOCOL_ICCD_A	1	/* ICCD Version A */
+#define PROTOCOL_ICCD_B	2	/* ICCD Version B */
 
 /* Product identification for special treatments */
 #define GEMPC433	0x08E64433

Modified: trunk/Drivers/ccid/src/commands.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/commands.c?rev=5013&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/commands.c (original)
+++ trunk/Drivers/ccid/src/commands.c Thu Jun 17 13:18:42 2010
@@ -87,7 +87,7 @@
 	_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(reader_index);
 
 #ifndef TWIN_SERIAL
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 		unsigned char pcbuffer[SIZE_GET_SLOT_STATUS];
@@ -117,7 +117,7 @@
 		return IFD_SUCCESS;
 	}
 
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 		unsigned char tmp[MAX_ATR_SIZE+1];
@@ -828,7 +828,7 @@
 	_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(reader_index);
 
 #ifndef TWIN_SERIAL
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 
@@ -845,7 +845,7 @@
 		return IFD_SUCCESS;
 	}
 
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 		unsigned char buffer[3];
@@ -919,7 +919,7 @@
 	_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(reader_index);
 
 #ifndef TWIN_SERIAL
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 		unsigned char status[1];
@@ -959,7 +959,7 @@
 		return IFD_SUCCESS;
 	}
 
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 		unsigned char buffer_tmp[3];
@@ -1101,7 +1101,7 @@
 	status_t ret;
 
 #ifndef TWIN_SERIAL
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 
@@ -1119,7 +1119,7 @@
 		return IFD_SUCCESS;
 	}
 
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 
@@ -1186,7 +1186,7 @@
 #ifndef TWIN_SERIAL
 	_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(reader_index);
 
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 
@@ -1206,7 +1206,7 @@
 		return IFD_SUCCESS;
 	}
 
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		int r;
 		unsigned char rx_tmp[4];
@@ -1400,7 +1400,7 @@
 	unsigned int local_rx_length, received_length;
 	int buffer_overflow = 0;
 
-	if (ICCD_B == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_B == ccid_descriptor->bInterfaceProtocol)
 	{
 		/* length is on 16-bits only
 		 * if a size > 0x1000 is used then usb_control_msg() fails with
@@ -1810,7 +1810,7 @@
 
 	DEBUG_COMM2("T=0: %d bytes", snd_len);
 
-	if (ICCD_A == ccid_descriptor->bInterfaceProtocol)
+	if (PROTOCOL_ICCD_A == ccid_descriptor->bInterfaceProtocol)
 	{
 		unsigned char pcbuffer[SIZE_GET_SLOT_STATUS];
 

Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=5013&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Thu Jun 17 13:18:42 2010
@@ -542,8 +542,8 @@
 						*(void **)Value = IFDHPolling;
 				}
 
-				if ((ICCD_A == ccid_desc->bInterfaceProtocol)
-					|| (ICCD_B == ccid_desc->bInterfaceProtocol))
+				if ((PROTOCOL_ICCD_A == ccid_desc->bInterfaceProtocol)
+					|| (PROTOCOL_ICCD_B == ccid_desc->bInterfaceProtocol))
 				{
 					*Length = sizeof(void *);
 					if (Value)
@@ -560,8 +560,8 @@
 				*Length = 0;
 
 				ccid_desc = get_ccid_descriptor(reader_index);
-				if ((ICCD_A == ccid_desc->bInterfaceProtocol)
-					|| (ICCD_B == ccid_desc->bInterfaceProtocol))
+				if ((PROTOCOL_ICCD_A == ccid_desc->bInterfaceProtocol)
+					|| (PROTOCOL_ICCD_B == ccid_desc->bInterfaceProtocol))
 				{
 					*Length = 1;	/* 1 char */
 					if (Value)




More information about the Pcsclite-cvs-commit mailing list