[Pcsclite-cvs-commit] CVS PCSC/src

CVS User rousseau ludovic.rousseau@free.fr
Thu, 24 Feb 2005 05:53:00 -0700


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv5774

Modified Files:
	winscard.c 
Log Message:
SCardControl(): check if the pbSendBuffer is NULL or no bytes are sent
for API v2 only. With API v3 we can use dwControlCode as the only data
to send.


--- /cvsroot/pcsclite/PCSC/src/winscard.c	2005/02/22 14:40:26	1.48
+++ /cvsroot/pcsclite/PCSC/src/winscard.c	2005/02/24 12:53:00	1.49
@@ -8,7 +8,7 @@
  *  David Corcoran <corcoran@linuxnet.com>
  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
- * $Id: winscard.c,v 1.48 2005/02/22 14:40:26 rousseau Exp $
+ * $Id: winscard.c,v 1.49 2005/02/24 12:53:00 rousseau Exp $
  */
 
 #include "config.h"
@@ -1112,8 +1112,9 @@
 	if (0 == hCard)
 		return SCARD_E_INVALID_HANDLE;
 
-	if (NULL == pbSendBuffer || 0 == cbSendLength)
-		return SCARD_E_INVALID_PARAMETER;
+	if (IFD_HVERSION_2_0 == rContext->dwVersion)
+		if (NULL == pbSendBuffer || 0 == cbSendLength)
+			return SCARD_E_INVALID_PARAMETER;
 
 	/*
 	 * Make sure no one has a lock on this reader