[Pcsclite-git-commit] [CCID] 01/01: OpenUSBByName(): read Info.plist only once
Ludovic Rousseau
rousseau at moszumanska.debian.org
Thu Dec 31 15:53:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit bc6124cb44677540fa5d5267e7af759796d6101c
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Thu Dec 31 16:49:07 2015 +0100
OpenUSBByName(): read Info.plist only once
On Mac OS X it is possible to ask libusb to rescan the USB bus waiting
for a device o be available.
See commit 690e90f476c3815c31874e523ba017f7f1d372cd
The problem was that the code to parse the driver Info.plist was also
re-executed. This code is now moved earlier and is executed only once
even on Mac OS X.
---
src/ccid_usb.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/ccid_usb.c b/src/ccid_usb.c
index 4f2bdc2..bee8a45 100644
--- a/src/ccid_usb.c
+++ b/src/ccid_usb.c
@@ -314,17 +314,6 @@ status_t OpenUSBByName(unsigned int reader_index, /*@null@*/ char *device)
}
}
-#ifdef __APPLE__
-again_libusb:
-#endif
- cnt = libusb_get_device_list(ctx, &devs);
- if (cnt < 0)
- {
- DEBUG_CRITICAL("libusb_get_device_list() failed\n");
- return_value = STATUS_UNSUCCESSFUL;
- goto end1;
- }
-
#define GET_KEYS(key, values) \
rv = LTPBundleFindValueWithKey(&plist, key, values); \
if (rv) \
@@ -347,6 +336,17 @@ again_libusb:
goto end1;
}
+#ifdef __APPLE__
+again_libusb:
+#endif
+ cnt = libusb_get_device_list(ctx, &devs);
+ if (cnt < 0)
+ {
+ DEBUG_CRITICAL("libusb_get_device_list() failed\n");
+ return_value = STATUS_UNSUCCESSFUL;
+ goto end1;
+ }
+
/* for any supported reader */
for (alias=0; alias<list_size(ifdVendorID); alias++)
{
--
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