[Pcsclite-cvs-commit] PCSC/src winscard_scf.c,1.5,1.6

sauveron-guest@quantz.debian.org sauveron-guest@quantz.debian.org
Tue, 23 Sep 2003 14:28:20 +0200


Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv10635/src

Modified Files:
	winscard_scf.c 
Log Message:
Solve the problem of never exiting the loop when a smartcard is already inserted in the reader, thus blocking the application.

Index: winscard_scf.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/winscard_scf.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- winscard_scf.c	8 Sep 2003 12:04:13 -0000	1.5
+++ winscard_scf.c	23 Sep 2003 12:28:18 -0000	1.6
@@ -914,6 +914,17 @@
     if ( ( dwBreakFlag == 1 ) && ( j == 0 ) ) {
       break;
     }
+
+    /*
+     * Solve the problem of never exiting the loop when a smartcard is
+     * already inserted in the reader, thus blocking the application
+     * (patch proposed by Serge Koganovitsch)
+     */
+    if ((dwTimeout == 0) && (j == 0))
+    {
+	    break;
+    }
+
   } while ( 1 ); /* end of do */
 
   if ( psContextMap[retIndice].contextBlockStatus ==