[Pcsclite-cvs-commit] r1972 - trunk/HandlerTest/Host
Ludovic Rousseau
rousseau at costa.debian.org
Fri Mar 24 14:13:16 CET 2006
Author: rousseau
Date: 2006-03-24 13:12:45 +0000 (Fri, 24 Mar 2006)
New Revision: 1972
Modified:
trunk/HandlerTest/Host/handler_test.c
Log:
exchange(): check the received size before checking the received content
Modified: trunk/HandlerTest/Host/handler_test.c
===================================================================
--- trunk/HandlerTest/Host/handler_test.c 2006-03-24 12:49:40 UTC (rev 1971)
+++ trunk/HandlerTest/Host/handler_test.c 2006-03-24 13:12:45 UTC (rev 1972)
@@ -794,6 +794,13 @@
return 1;
}
+ /* check the received length */
+ if (*r_length != e_length)
+ {
+ printf("ERROR: Expected %d bytes and received %ld\n", e_length, *r_length);
+ return 1;
+ }
+
/* check the received data */
for (i=0; i<*r_length; i++)
if (r[i] != e[i])
@@ -802,13 +809,6 @@
return 1;
}
- /* check the received length */
- if (*r_length != e_length)
- {
- printf("ERROR: Expected %d bytes and received %ld\n", e_length, *r_length);
- return 1;
- }
-
printf("--------> OK\n");
return 0;
More information about the Pcsclite-cvs-commit
mailing list