[Pcsclite-git-commit] [CCID] 01/01: command.c: returns IFD_ERROR_INSUFFICIENT_BUFFER
Ludovic Rousseau
rousseau at moszumanska.debian.org
Fri Nov 6 08:07:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit 3c0a6f6a8cf8bb7051ac32a6f089b904747e7ab6
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Fri Nov 6 09:00:34 2015 +0100
command.c: returns IFD_ERROR_INSUFFICIENT_BUFFER
If the reader returns an error (cancel or timeout) that the driver
reports as SW=0x6400 or SW=0x6401 and the RX buffer is less than 2
bytes the driver now returns IFD_ERROR_INSUFFICIENT_BUFFER instead of
IFD_COMMUNICATION_ERROR.
Thanks to Godfrey Chung and the ACS driver version 1.1.1 for idea.
---
src/commands.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/commands.c b/src/commands.c
index 2c215a5..c2fe3b9 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1510,7 +1510,7 @@ time_request:
{
case 0xEF: /* cancel */
if (*rx_length < 2)
- return IFD_COMMUNICATION_ERROR;
+ return IFD_ERROR_INSUFFICIENT_BUFFER;
rx_buffer[0]= 0x64;
rx_buffer[1]= 0x01;
*rx_length = 2;
@@ -1518,7 +1518,7 @@ time_request:
case 0xF0: /* timeout */
if (*rx_length < 2)
- return IFD_COMMUNICATION_ERROR;
+ return IFD_ERROR_INSUFFICIENT_BUFFER;
rx_buffer[0]= 0x64;
rx_buffer[1]= 0x00;
*rx_length = 2;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git
More information about the Pcsclite-cvs-commit
mailing list