Skip to content

Commit

Permalink
libusb_error_name: log status name instead of value
Browse files Browse the repository at this point in the history
We now have:
ccid_usb.c:1962:Multi_InterruptRead() Multi_InterruptRead (3), LIBUSB_TRANSFER_TIMED_OUT
instead of:
ccid_usb.c:1962:Multi_InterruptRead() Multi_InterruptRead (3), status=2
  • Loading branch information
LudovicRousseau committed May 24, 2024
1 parent 7f3cc53 commit b381816
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ccid_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1956,14 +1956,17 @@ static int Multi_InterruptRead(int reader_index, int timeout /* in ms */)
{
if (0 == (buffer[interrupt_byte] & interrupt_mask))
{
DEBUG_PERIODIC2("Multi_InterruptRead (%d) -- skipped", reader_index);
DEBUG_PERIODIC2("Multi_InterruptRead (%d) -- skipped",
reader_index);
goto again;
}
DEBUG_PERIODIC2("Multi_InterruptRead (%d), got an interrupt", reader_index);
DEBUG_PERIODIC2("Multi_InterruptRead (%d), got an interrupt",
reader_index);
}
else
{
DEBUG_PERIODIC3("Multi_InterruptRead (%d), status=%d", reader_index, status);
DEBUG_PERIODIC3("Multi_InterruptRead (%d), %s",
reader_index, libusb_error_name(status));
}

return status;
Expand Down

0 comments on commit b381816

Please sign in to comment.