[Pcsclite-cvs-commit] r6386 - /trunk/PCSC/src/readerfactory.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Jul 3 15:04:29 UTC 2012


Author: rousseau
Date: Tue Jul  3 15:04:28 2012
New Revision: 6386

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6386
Log:
RFRemoveReader(): only remove one reader

We should not need to loop over every matching reader and remove them
all. Or I am missing something.

This code is present since the first version of RFRemoveReader() back in
2002.

Modified:
    trunk/PCSC/src/readerfactory.c

Modified: trunk/PCSC/src/readerfactory.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/readerfactory.c?rev=6386&op=diff
==============================================================================
--- trunk/PCSC/src/readerfactory.c (original)
+++ trunk/PCSC/src/readerfactory.c Tue Jul  3 15:04:28 2012
@@ -474,8 +474,8 @@
 	if (readerName == NULL)
 		return SCARD_E_INVALID_VALUE;
 
-	while (SCARD_S_SUCCESS ==
-		RFReaderInfoNamePort(port, readerName, &sContext))
+	rv = RFReaderInfoNamePort(port, readerName, &sContext);
+	if (SCARD_S_SUCCESS == rv)
 	{
 		/* Try to destroy the thread */
 		if (sContext -> pthThread)




More information about the Pcsclite-cvs-commit mailing list