[Pcsclite-cvs-commit] r4545 - /trunk/Drivers/ccid/src/commands.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Nov 13 17:33:16 UTC 2009
Author: rousseau
Date: Fri Nov 13 17:33:10 2009
New Revision: 4545
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4545
Log:
CmdGetSlotStatus(): the SCM SCR3310 also reports an error 0xFE
(ICC_MUTE) when no card is inserted. So extend the special case to all
readers and not just the O2MICRO OZ776.
Thanks to Ivan Vilata i Balaguer for the bug report (Debian bug #555837)
Modified:
trunk/Drivers/ccid/src/commands.c
Modified: trunk/Drivers/ccid/src/commands.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/commands.c?rev=4545&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/commands.c (original)
+++ trunk/Drivers/ccid/src/commands.c Fri Nov 13 17:33:10 2009
@@ -1013,20 +1013,12 @@
return IFD_COMMUNICATION_ERROR;
}
- if (buffer[STATUS_OFFSET] & CCID_COMMAND_FAILED)
- {
-#ifdef O2MICRO_OZ776_PATCH
- /* the O2MICRO OZ 776 reader sends card absent or mute errors
- * when no card is inserted */
- if (! (((OZ776 == ccid_descriptor->readerID)
- || (OZ776_7772 == ccid_descriptor->readerID))
- && (buffer[ERROR_OFFSET] == 0xFE)))
-#endif
+ if ((buffer[STATUS_OFFSET] & CCID_COMMAND_FAILED)
+ /* card absent or mute is not an communication error */
+ && (buffer[ERROR_OFFSET] != 0xFE))
+ {
+ return_value = IFD_COMMUNICATION_ERROR;
ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__); /* bError */
-
- /* card absent or mute is not an communication error */
- if (buffer[ERROR_OFFSET] != 0xFE)
- return_value = IFD_COMMUNICATION_ERROR;
}
return return_value;
More information about the Pcsclite-cvs-commit
mailing list