Sawchord / usbip-device

Implementation of the UsbBus trait of usb-device, which simulates a Bus as a USBIP Server. Useful for developing UsbClass traits and simulating devices.
Apache License 2.0
12 stars 4 forks source link

Set actual length in USBIP_RET_SUBMIT message #2

Closed robin-nitrokey closed 2 years ago

robin-nitrokey commented 2 years ago

This patch sets the actual_length field of the USBIP_RET_SUBMIT message to the number of bytes received with the USBIP_CMD_SUBMIT message.


This fixes an issue where the number of bytes written was reported incorrectly on the host, see https://github.com/trussed-dev/pc-usbip-runner/issues/9.

Sawchord commented 2 years ago

Looks good to me. Thanks a lot.

robin-nitrokey commented 2 years ago

Thanks for the quick merge!

szszszsz commented 2 years ago

@Sawchord Hi! Thank you for a quick reaction! Do you plan to make a new release with this patch?

Sawchord commented 2 years ago

Oh yeah good idea. Can do