[Pcsclite-cvs-commit] Drivers/ccid/src/openct proto-t1.h,1.5,1.6 proto-t1.c,1.9,1.10

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


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

Modified Files:
	proto-t1.h proto-t1.c 
Log Message:
BUG: I forgot to initialise the t1.lun field. It failed to work with
more than one readers and a T=1 card in a TPDU reader.


Index: proto-t1.h
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/openct/proto-t1.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- proto-t1.h	15 Jul 2004 14:52:18 -0000	1.5
+++ proto-t1.h	19 Jul 2004 13:32:25 -0000	1.6
@@ -64,7 +64,7 @@
 int t1_transceive(t1_state_t *t1, unsigned int dad,
 		const void *snd_buf, size_t snd_len,
 		void *rcv_buf, size_t rcv_len);
-int t1_init(t1_state_t *t1);
+int t1_init(t1_state_t *t1, int lun);
 void t1_release(t1_state_t *t1);
 int t1_set_param(t1_state_t *t1, int type, long value);
 int t1_negociate_ifsd(t1_state_t *t1, unsigned int dad, int ifsd);

Index: proto-t1.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/openct/proto-t1.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- proto-t1.c	19 Jul 2004 09:36:09 -0000	1.9
+++ proto-t1.c	19 Jul 2004 13:32:25 -0000	1.10
@@ -107,12 +107,14 @@
  * Attach t1 protocol
  */
 int
-t1_init(t1_state_t *t1)
+t1_init(t1_state_t *t1, int lun)
 {
 	t1_set_defaults(t1);
 	t1_set_param(t1, IFD_PROTOCOL_T1_CHECKSUM_LRC, 0);
 	t1_set_param(t1, IFD_PROTOCOL_T1_STATE, SENDING);
 	t1_set_param(t1, IFD_PROTOCOL_T1_MORE, FALSE);
+
+	t1->lun = lun;
 
 	return 0;
 }