[Pcsclite-cvs-commit] Drivers/ccid/src ifdhandler.c,1.14,1.15

rousseau@quantz.debian.org rousseau@quantz.debian.org
Wed, 11 Feb 2004 11:12:03 +0100


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory quantz:/tmp/cvs-serv1012

Modified Files:
	ifdhandler.c 
Log Message:
use Protocol_T1_Negociate_IFSD() in CardUp()


Index: ifdhandler.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ifdhandler.c	3 Feb 2004 15:44:52 -0000	1.14
+++ ifdhandler.c	11 Feb 2004 10:12:00 -0000	1.15
@@ -30,6 +30,7 @@
 #include "ccid.h"
 #include "protocol_t1/atr.h"
 #include "protocol_t1/pps.h"
+#include "protocol_t1/protocol_t1.h"
 
 #ifdef HAVE_PTHREAD
 #include <pthread.h>
@@ -586,10 +587,12 @@
 		/* set T=1 context */
 		Protocol_T1_Init(t1, lun);
 
-		/* bloc size is limited by the reader */
-		t1 -> ifsd = MIN(t1 -> ifsd, ccid_desc -> dwMaxIFSD);
-
 		SetParameters(t1->lun, 1, 7, param);
+
+		/* negotiate IFSD */
+		Protocol_T1_Negociate_IFSD(t1, ccid_desc -> dwMaxIFSD);
+
+		DEBUG_COMM3("T=1: IFSC=%d, IFSD=%d", t1->ifsc, t1->ifsd);
 	}
 
 	/* PPS not negociated by reader, and TA1 present */