提交 e6472210 编写于 作者: H Hans de Goede 提交者: Gerd Hoffmann

usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint

We should return USB_RET_NAK, rather then a 0 sized packet, when we've no data
for an interrupt IN endpoint.
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 d86b8853
...@@ -548,7 +548,10 @@ static int usbredir_handle_interrupt_data(USBRedirDevice *dev, ...@@ -548,7 +548,10 @@ static int usbredir_handle_interrupt_data(USBRedirDevice *dev,
/* Check interrupt_error for stream errors */ /* Check interrupt_error for stream errors */
status = dev->endpoint[EP2I(ep)].interrupt_error; status = dev->endpoint[EP2I(ep)].interrupt_error;
dev->endpoint[EP2I(ep)].interrupt_error = 0; dev->endpoint[EP2I(ep)].interrupt_error = 0;
return usbredir_handle_status(dev, status, 0); if (status) {
return usbredir_handle_status(dev, status, 0);
}
return USB_RET_NAK;
} }
DPRINTF("interrupt-token-in ep %02X status %d len %d\n", ep, DPRINTF("interrupt-token-in ep %02X status %d len %d\n", ep,
intp->status, intp->len); intp->status, intp->len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册