common: Display an error if we don't transfer everything.
This commit is contained in:
parent
9d050b4370
commit
a9705d88e3
|
@ -123,7 +123,7 @@ static int send_data(struct libusb_device_handle *dev, uint8_t endp,
|
|||
buf, len,
|
||||
&num, 10000);
|
||||
|
||||
if (ret < 0) {
|
||||
if (ret < 0 || len != num) {
|
||||
ERROR("Failure to send data to printer (libusb error %d: (%d/%d to 0x%02x))\n", ret, num, len, endp);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue