[Pcsclite-cvs-commit] Drivers/ccid/src/protocol_t1 protocol_t1.c,1.8,1.9

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


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

Modified Files:
	protocol_t1.c 
Log Message:
in Protocol_T1_Negociate_IFSD() rename sblock in block since the same
variable is used for sent and received block.
This was not clear and was the source of reported bug [ #300707 ]
"Delete block before using it in t1_protocol.c" which is not a bug in fact.


Index: protocol_t1.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/protocol_t1/protocol_t1.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- protocol_t1.c	12 Feb 2004 16:11:08 -0000	1.8
+++ protocol_t1.c	7 May 2004 12:20:18 -0000	1.9
@@ -66,22 +66,22 @@
 int
 Protocol_T1_Negociate_IFSD(Protocol_T1 * t1, int ifsd)
 {
-	T1_Block *sblock;
+	T1_Block *block;
 	BYTE inf[1];
 	int ret;
 
 	inf[0] = ifsd;
-	sblock = T1_Block_NewSBlock(T1_BLOCK_S_IFS_REQ, 1, inf);
+	block = T1_Block_NewSBlock(T1_BLOCK_S_IFS_REQ, 1, inf);
 
-	ret = Protocol_T1_SendBlock(t1, sblock);
-	T1_Block_Delete(sblock);
+	ret = Protocol_T1_SendBlock(t1, block);
+	T1_Block_Delete(block);
 	if (PROTOCOL_T1_OK != ret)
 		return ret;
 
-	if (PROTOCOL_T1_OK == Protocol_T1_ReceiveBlock(t1, &sblock))
+	if (PROTOCOL_T1_OK == Protocol_T1_ReceiveBlock(t1, &block))
 	{
-		t1 -> ifsd = T1_Block_GetInf(sblock)[0];
-		T1_Block_Delete(sblock);
+		t1 -> ifsd = T1_Block_GetInf(block)[0];
+		T1_Block_Delete(block);
 	}
 
 	return PROTOCOL_T1_OK;