[Pcsclite-cvs-commit] Drivers/ccid/src commands.c,1.2,1.3
rousseau@quantz.debian.org
rousseau@quantz.debian.org
Tue, 28 Oct 2003 17:51:40 +0100
Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory quantz:/tmp/cvs-serv29657/src
Modified Files:
commands.c
Log Message:
correct a stupid bug that occurs with an APDU with 2 bytes response.
Index: commands.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/commands.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- commands.c 10 Sep 2003 09:06:41 -0000 1.2
+++ commands.c 28 Oct 2003 16:51:37 -0000 1.3
@@ -408,13 +408,13 @@
tx_buffer[1] = 0xC0;
tx_buffer[2] = 0x00;
tx_buffer[3] = 0x00;
- tx_length = 5;
- *rx_length = old_rx_length;
if (rx_buffer[0] == 0x61)
{
/* Get Response */
DEBUG_COMM2("TPDU: Automatic Get Response after 61%02X", rx_buffer[1]);
+ *rx_length = old_rx_length;
+
/* Card sent 61 xx
* xx = 0 means 256 */
if (rx_buffer[1] == 0)
@@ -434,6 +434,8 @@
{
/* Get Response */
DEBUG_COMM("TPDU: Automatic Get Response after 9000");
+ *rx_length = old_rx_length;
+
/* Card sent 90 00
* Get Response with P3 = Le */
tx_buffer[4] = Le;