Use libusb_error_name() more often for better diagnostics.
This commit is contained in:
parent
9dfacd8706
commit
eb8e6cd2cb
|
@ -774,8 +774,8 @@ static void LIBUSB_CALL receive_transfer(struct libusb_transfer *transfer)
|
||||||
|
|
||||||
sdi = transfer->user_data;
|
sdi = transfer->user_data;
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
sr_spew("receive_transfer(): status %d received %d bytes.",
|
sr_spew("receive_transfer(): status %s received %d bytes.",
|
||||||
transfer->status, transfer->actual_length);
|
libusb_error_name(transfer->status), transfer->actual_length);
|
||||||
|
|
||||||
if (transfer->actual_length == 0)
|
if (transfer->actual_length == 0)
|
||||||
/* Nothing to send to the bus. */
|
/* Nothing to send to the bus. */
|
||||||
|
|
|
@ -270,7 +270,8 @@ SR_PRIV void LIBUSB_CALL sl2_receive_transfer_in( struct libusb_transfer *transf
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
||||||
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
|
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
|
||||||
sr_err("Transfer to device failed: %i.", transfer->status);
|
sr_err("Transfer to device failed: %s.",
|
||||||
|
libusb_error_name(transfer->status));
|
||||||
devc->transfer_error = TRUE;
|
devc->transfer_error = TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +401,8 @@ SR_PRIV void LIBUSB_CALL sl2_receive_transfer_out( struct libusb_transfer *trans
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
||||||
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
|
if (transfer->status != LIBUSB_TRANSFER_COMPLETED) {
|
||||||
sr_err("Transfer to device failed: %i.", transfer->status);
|
sr_err("Transfer to device failed: %s.",
|
||||||
|
libusb_error_name(transfer->status));
|
||||||
devc->transfer_error = TRUE;
|
devc->transfer_error = TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue