usb-redir: Return babble when getting more bulk data then requested

Babble is the appropriate error in this case (rather then signalling a stall).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Hans de Goede 2012-08-28 11:33:47 +02:00 committed by Gerd Hoffmann
parent de550a6afb
commit 2979a36183
1 changed files with 3 additions and 3 deletions

View File

@ -1324,9 +1324,9 @@ static void usbredir_bulk_packet(void *priv, uint32_t id,
if (data_len <= p->iov.size) {
usb_packet_copy(p, data, data_len);
} else {
ERROR("bulk buffer too small (%d > %zd)\n", data_len,
p->iov.size);
len = USB_RET_STALL;
ERROR("bulk got more data then requested (%d > %zd)\n",
data_len, p->iov.size);
len = USB_RET_BABBLE;
}
}
p->result = len;