[Pcsclite-cvs-commit] r2349 - trunk/PCSC/src

Ludovic Rousseau rousseau at alioth.debian.org
Sat Jan 20 16:44:56 CET 2007


Author: rousseau
Date: 2007-01-20 16:44:56 +0100 (Sat, 20 Jan 2007)
New Revision: 2349

Modified:
   trunk/PCSC/src/winscard.c
Log:
SCardConnect(): return SCARD_W_UNPOWERED_CARD if the card is mute
instead of returning SCARD_E_PROTO_MISMATCH because the requested
protocol is not supported by the (mute) card


Modified: trunk/PCSC/src/winscard.c
===================================================================
--- trunk/PCSC/src/winscard.c	2007-01-20 15:12:19 UTC (rev 2348)
+++ trunk/PCSC/src/winscard.c	2007-01-20 15:44:56 UTC (rev 2349)
@@ -271,8 +271,15 @@
 			Log1(PCSC_LOG_ERROR, "Card Not Inserted");
 			return SCARD_E_NO_SMARTCARD;
 		}
+
+		if (dwStatus & SCARD_SWALLOWED)
+		{
+			Log1(PCSC_LOG_ERROR, "Card Not Powered");
+			return SCARD_W_UNPOWERED_CARD;
+		}
 	}
 
+
 	/*******************************************
 	 *
 	 * This section tries to decode the ATR




More information about the Pcsclite-cvs-commit mailing list