Don't skip empty transfers. In isochronous transfers, make sure (#72)

Don't skip empty transfers.
Update the fake libusb to honor the endpoint max packet sizes.
Update tests that were taking advantage of the fact that libusb
allowed unlimited amount of data in any transfer packet.
This commit is contained in:
Sebastian Zagrodzki
2019-08-12 21:38:32 +02:00
committed by GitHub
parent 2dc560e6be
commit 18f4c1d8a7
6 changed files with 68 additions and 28 deletions

View File

@@ -86,10 +86,6 @@ func (e *endpoint) String() string {
}
func (e *endpoint) transfer(ctx context.Context, buf []byte) (int, error) {
if len(buf) == 0 {
return 0, nil
}
t, err := newUSBTransfer(e.ctx, e.h, &e.Desc, len(buf))
if err != nil {
return 0, err