common: Display an error if we don't transfer everything.

This commit is contained in:
Solomon Peachy 2013-06-29 21:35:45 -04:00
parent 9d050b4370
commit a9705d88e3

View file

@ -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;
}