Gustavo Chain wrote: > Daniel, the SECUGEN-FDU2000 allways returns the size you are requesting > ( or < 1 on error). But you are right, you I miss check that the image > is complete.
My USB knowledge is a little shady here, but I believe that the device never actually gets to know how many bytes you are requesting. You're just hoping that the device is always going to do what it is documented to do, and that nothing can intervene. If something goes wrong, or the device gets unplugged in the middle of a transfer then you may get less bytes than requested. I don't think it could happen in your code at the moment, but in the worst case, someone could produce a device which purposefully sends less data with the aim of crashing the authentication system in use. As bulk URBs are split into several smaller 16kb URBs (44 of them in this case), it is also possible that the first 20 could complete and then it times out and you get a partial transfer (e.g. on a slow/busy system). I still think you should be checking the return value for the number of bytes you are expecting. Daniel _______________________________________________ fprint mailing list [email protected] http://lists.reactivated.net/mailman/listinfo/fprint
