[Pcsclite-cvs-commit] Drivers/ccid/src parse.c,1.16,1.17

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv25284

Modified Files:
	parse.c 
Log Message:
do not use OpenUSB/CloseUSB but IFDHCreateChannel/IFDHCloseChannel to
use the ReaderIndex[] mechanism


Index: parse.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/parse.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- parse.c	16 Jul 2004 06:53:25 -0000	1.16
+++ parse.c	4 Aug 2004 19:53:34 -0000	1.17
@@ -28,10 +28,10 @@
 # endif
 #include <usb.h>
 
+#include <ifdhandler.h>
 #include "defs.h"
 #include "ccid_ifdhandler.h"
 #include "ccid.h"
-#include "ccid_usb.h"
 
 #ifndef TRUE
 #define TRUE 1
@@ -54,10 +54,10 @@
 
 	for (channel=0; channel<CCID_DRIVER_MAX_READERS; channel++)
 	{
-		res = OpenUSB(channel<<16, channel);
-		if (res != STATUS_SUCCESS)
+		res = IFDHCreateChannel(channel<<16, channel);
+		if (res != IFD_SUCCESS)
 		{
-			fprintf(stderr, "ccid_OpenUSB: 0x%02X\n", res);
+			fprintf(stderr, "ccid_OpenUSB: %d\n", res);
 			break;
 		}
 		else
@@ -73,8 +73,8 @@
 	if (channel == 0)
 		printf("No known CCID reader found\n");
 
-	for (;channel!=0; channel--)
-		(void)CloseUSB(channel<<16);
+	for (channel--; channel!=0; channel--)
+		(void)IFDHCloseChannel(channel<<16);
 
 	return 0;
 } /* main */