[Pcsclite-cvs-commit] CVS Drivers/ccid/src

CVS User rousseau ludovic.rousseau@free.fr
Thu, 30 Sep 2004 08:00:14 -0600


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

Modified Files:
	commands.c 
Log Message:
CmdGetSlotStatus(): card absent or mute is not an communication error
(even if the CCID command result indicates a command failure)


--- /cvsroot/pcsclite/Drivers/ccid/src/commands.c	2004/09/08 20:45:19	1.31
+++ /cvsroot/pcsclite/Drivers/ccid/src/commands.c	2004/09/30 14:00:13	1.32
@@ -18,7 +18,7 @@
 */
 
 /*
- * $Id: commands.c,v 1.31 2004/09/08 20:45:19 rousseau Exp $
+ * $Id: commands.c,v 1.32 2004/09/30 14:00:13 rousseau Exp $
  */
 
 #include <string.h>
@@ -355,7 +355,10 @@
 	if (buffer[STATUS_OFFSET] & CCID_COMMAND_FAILED)
 	{
 		ccid_error(buffer[ERROR_OFFSET], __FILE__, __LINE__, __FUNCTION__);    /* bError */
-		return_value = IFD_COMMUNICATION_ERROR;
+
+		/* card absent or mute is not an communication error */
+		if (buffer[ERROR_OFFSET] != 0xFE)
+			return_value = IFD_COMMUNICATION_ERROR;
 	}
 
 	return return_value;