[Pcsclite-cvs-commit] Drivers/ccid/src commands.c,1.25,1.26

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv1476/src

Modified Files:
	commands.c 
Log Message:
use bCurrentSlotIndex as the slot number in the CCID commands (instead of 0)


Index: commands.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/commands.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- commands.c	16 Jul 2004 06:31:15 -0000	1.25
+++ commands.c	21 Jul 2004 09:00:09 -0000	1.26
@@ -85,7 +85,7 @@
 again:
 	cmd[0] = 0x62; /* IccPowerOn */
 	cmd[1] = cmd[2] = cmd[3] = cmd[4] = 0;	/* dwLength */
-	cmd[5] = 0;	/* slot number */
+	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd[6] = ccid_descriptor->bSeq++;
 	cmd[7] = voltage;
 	cmd[8] = cmd[9] = 0; /* RFU */
@@ -200,7 +200,7 @@
 	}
 
 	cmd[0] = 0x69;	/* Secure */
-	cmd[5] = 0;		/* slot number */
+	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd[6] = ccid_descriptor->bSeq++;
 	cmd[7] = 0;		/* bBWI */
 	cmd[8] = 0;		/* wLevelParameter */
@@ -242,7 +242,7 @@
 
 	cmd_in[0] = 0x6B; /* PC_to_RDR_Escape */
 	i2dw(length_in - 10, cmd_in+1);	/* dwLength */
-	cmd_in[5] = 0;	/* slot number */
+	cmd_in[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd_in[6] = ccid_descriptor->bSeq++;
 	cmd_in[7] = cmd_in[8] = cmd_in[9] = 0; /* RFU */
 
@@ -298,7 +298,7 @@
 
 	cmd[0] = 0x63; /* IccPowerOff */
 	cmd[1] = cmd[2] = cmd[3] = cmd[4] = 0;	/* dwLength */
-	cmd[5] = 0;	/* slot number */
+	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd[6] = ccid_descriptor->bSeq++;
 	cmd[7] = cmd[8] = cmd[9] = 0; /* RFU */
 
@@ -336,7 +336,7 @@
 
 	cmd[0] = 0x65; /* GetSlotStatus */
 	cmd[1] = cmd[2] = cmd[3] = cmd[4] = 0;	/* dwLength */
-	cmd[5] = 0;	/* slot number */
+	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd[6] = ccid_descriptor->bSeq++;
 	cmd[7] = cmd[8] = cmd[9] = 0; /* RFU */
 
@@ -435,7 +435,7 @@
 
 	cmd[0] = 0x6F; /* XfrBlock */
 	i2dw(tx_length, cmd+1);	/* APDU length */
-	cmd[5] = 0;	/* slot number */
+	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd[6] = ccid_descriptor->bSeq++;
 	cmd[7] = bBWI;	/* extend block waiting timeout */
 	cmd[8] = cmd[9] = 0; /* RFU */
@@ -558,7 +558,7 @@
 
 	cmd[0] = 0x61; /* SetParameters */
 	i2dw(length, cmd+1);	/* APDU length */
-	cmd[5] = 0;	/* slot number */
+	cmd[5] = ccid_descriptor->bCurrentSlotIndex;	/* slot number */
 	cmd[6] = ccid_descriptor->bSeq++;
 	cmd[7] = protocol;	/* bProtocolNum */
 	cmd[8] = cmd[9] = 0; /* RFU */