[Pcsclite-cvs-commit] r3019 - /trunk/PCSC/src/winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Jun 24 08:33:12 UTC 2008


Author: rousseau
Date: Tue Jun 24 08:33:12 2008
New Revision: 3019

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3019
Log:
SCardListReaders(): always set the pcchReaders even if
SCARD_E_INSUFFICIENT_BUFFER is returned

Modified:
    trunk/PCSC/src/winscard_clnt.c

Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3019&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Tue Jun 24 08:33:12 2008
@@ -3150,9 +3150,6 @@
 		}
 	}
 
-	/* set the reader names length */
-	*pcchReaders = dwReadersLen;
-
 	if (mszReaders == NULL)	/* text array not allocated */
 		goto end;
 
@@ -3170,6 +3167,9 @@
 	*buf = '\0';	/* Add the last null */
 
 end:
+	/* set the reader names length */
+	*pcchReaders = dwReadersLen;
+
 	SYS_MutexUnLock(psContextMap[dwContextIndex].mMutex);
 
 	PROFILE_END(rv)




More information about the Pcsclite-cvs-commit mailing list