[Pcsclite-git-commit] [CCID] 01/01: InterruptRead(): return a valid IFDHandler code
Ludovic Rousseau
rousseau at moszumanska.debian.org
Thu Jan 12 18:42:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit e5697f33cc8dfa89d562c8abf859024bfe9e95a8
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Thu Jan 12 17:32:54 2017 +0100
InterruptRead(): return a valid IFDHandler code
If libusb reports an error then return IFD_COMMUNICATION_ERROR instead
of the libusb error code.
That should not be a problem since pcsc-lite only check for the value
IFD_SUCCESS and anything else, including a libusb error code, is an error.
---
src/ccid_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ccid_usb.c b/src/ccid_usb.c
index 8fc9897..f0d6512 100644
--- a/src/ccid_usb.c
+++ b/src/ccid_usb.c
@@ -1258,7 +1258,7 @@ int InterruptRead(int reader_index, int timeout /* in ms */)
libusb_free_transfer(transfer);
DEBUG_CRITICAL2("libusb_submit_transfer failed: %s",
libusb_error_name(ret));
- return ret;
+ return IFD_COMMUNICATION_ERROR;
}
usbDevice[reader_index].polling_transfer = transfer;
@@ -1277,7 +1277,7 @@ int InterruptRead(int reader_index, int timeout /* in ms */)
libusb_free_transfer(transfer);
DEBUG_CRITICAL2("libusb_handle_events failed: %s",
libusb_error_name(ret));
- return ret;
+ return IFD_COMMUNICATION_ERROR;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git
More information about the Pcsclite-cvs-commit
mailing list