[Pcsclite-cvs-commit] r4231 - /trunk/HandlerTest/Host/handler_test.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Wed May 27 20:10:50 UTC 2009


Author: rousseau
Date: Wed May 27 20:10:50 2009
New Revision: 4231

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4231
Log:
correctly use (switch) case 2 and case 3

Thanks to Harm Braams for the bug report

Modified:
    trunk/HandlerTest/Host/handler_test.c

Modified: trunk/HandlerTest/Host/handler_test.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/HandlerTest/Host/handler_test.c?rev=4231&op=diff
==============================================================================
--- trunk/HandlerTest/Host/handler_test.c (original)
+++ trunk/HandlerTest/Host/handler_test.c Wed May 27 20:10:50 2009
@@ -403,10 +403,10 @@
 
 	memset(&RecvPci, 0, sizeof(RecvPci));
 
-	if (cases & CASE2)
-	{
-		/* Case 2 */
-		text = "Case 2: CLA INS P1 P2 Le, L(Cmd) = 5";
+	if (cases & CASE3)
+	{
+		/* Case 3 */
+		text = "Case 3: CLA INS P1 P2 Lc Data, L(Cmd) = 5 + Lc";
 		start = end = 65535;
 		if (full)
 			start = 1;
@@ -444,14 +444,14 @@
 		}
 	}
 
-	if (cases & CASE3)
-	{
-		/* Case 3 */
+	if (cases & CASE2)
+	{
+		/* Case 2 */
 		/*
 		 * 252  (0xFC) is max size for one USB or GBP paquet
 		 * 256 (0x100) maximum, 1 minimum
 		 */
-		text = "Case 3: CLA INS P1 P2 Lc Data, L(Cmd) = 5 + Lc";
+		text = "Case 2: CLA INS P1 P2 Le, L(Cmd) = 5";
 		start = end = 65535;
 		if (full)
 			start = 1;
@@ -612,14 +612,14 @@
 		}
 	}
 
-	if (cases & CASE2)
-	{
-		/* Case 2 */
+	if (cases & CASE3)
+	{
+		/* Case 3 */
 		/*
 		 * 248 (0xF8) is max size for one USB or GBP paquet
 		 * 255 (0xFF) maximum, 1 minimum
 		 */
-		text = "Case 2: CLA INS P1 P2 Le, L(Cmd) = 5";
+		text = "Case 3: CLA INS P1 P2 Lc Data, L(Cmd) = 5 + Lc";
 		start = end = 255;
 		if (full)
 			start = 1;
@@ -648,14 +648,14 @@
 		}
 	}
 
-	if (cases & CASE3)
-	{
-		/* Case 3 */
+	if (cases & CASE2)
+	{
+		/* Case 2 */
 		/*
 		 * 252  (0xFC) is max size for one USB or GBP paquet
 		 * 256 (0x100) maximum, 1 minimum
 		 */
-		text = "Case 3: CLA INS P1 P2 Lc Data, L(Cmd) = 5 + Lc";
+		text = "Case 2: CLA INS P1 P2 Le, L(Cmd) = 5";
 		start = end = 256;
 		if (full)
 			start = 1;
@@ -691,8 +691,8 @@
 		}
 
 #if 0
-		/* Case 3, length too short */
-		text = "Case 3, length too short: CLA INS P1 P2 Lc Data, L(Cmd) = 5 + Lc";
+		/* Case 2, length too short */
+		text = "Case 2, length too short: CLA INS P1 P2 Le, L(Cmd) = 5";
 		len_o = 20;
 
 		s[0] = 0x80;
@@ -733,8 +733,8 @@
 #endif
 
 #if 0
-		/* Case 3, length too long */
-		text = "Case 3, length too long: CLA INS P1 P2 Lc Data, L(Cmd) = 5 + Lc";
+		/* Case 2, length too long */
+		text = "Case 2, length too long: CLA INS P1 P2 Le, L(Cmd) = 5";
 		len_o = 20;
 
 		s[0] = 0x80;




More information about the Pcsclite-cvs-commit mailing list