[Pcsclite-git-commit] [pcsc-tools] 31/32: pcsc_scan: reset the card before exiting stress()

Ludovic Rousseau rousseau at moszumanska.debian.org
Thu May 4 15:44:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository pcsc-tools.

commit a1a13869fa670894baf53e39159cca92e109b8b8
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu May 4 17:40:08 2017 +0200

    pcsc_scan: reset the card before exiting stress()
    
    If the stress test fails then we power down the card (SCARD_UNPOWER_CARD)
    instead of doing nothing (SCARD_LEAVE_CARD) so that the card can
    reset and come back to work for the next stress loop.
---
 pcsc_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pcsc_scan.c b/pcsc_scan.c
index fbaf038..86c5b00 100644
--- a/pcsc_scan.c
+++ b/pcsc_scan.c
@@ -169,7 +169,7 @@ static LONG stress(LONG hContext, const char *readerName)
 	printf("Total time: %ld µs\n", delta);
 	printf("%f APDU/s\n", 1000000. / (delta / count));
 
-	rv = SCardDisconnect(hCard, SCARD_LEAVE_CARD);
+	rv = SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
 	if (rv != SCARD_S_SUCCESS)
 	{
 		print_pcsc_error("SCardDisconnect", rv);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/pcsc-tools.git



More information about the Pcsclite-cvs-commit mailing list