[Pcsclite-cvs-commit] r2675 - /trunk/Drivers/ccid/src/parse.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Nov 1 14:35:30 UTC 2007
Author: rousseau
Date: Thu Nov 1 14:35:29 2007
New Revision: 2675
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2675
Log:
claim and release the interface
Modified:
trunk/Drivers/ccid/src/parse.c
Modified: trunk/Drivers/ccid/src/parse.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/parse.c?rev=2675&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/parse.c (original)
+++ trunk/Drivers/ccid/src/parse.c Thu Nov 1 14:35:29 2007
@@ -73,6 +73,7 @@
for (dev = bus->devices; dev; dev = dev->next)
{
struct usb_interface *usb_interface = NULL;
+ int interface;
/* check if the device has bInterfaceClass == 11 */
usb_interface = get_ccid_usb_interface(dev);
@@ -108,7 +109,18 @@
continue;
}
+ interface = usb_interface->altsetting->bInterfaceNumber;
+ if (usb_claim_interface(dev_handle, interface) < 0)
+ {
+ usb_close(dev_handle);
+ fprintf(stderr, "Can't claim interface %s/%s: %s\n",
+ bus->dirname, dev->filename, strerror(errno));
+ continue;
+ }
+
ccid_parse_interface_descriptor(dev_handle, dev);
+
+ usb_release_interface(dev_handle, interface);
usb_close(dev_handle);
nb++;
}
More information about the Pcsclite-cvs-commit
mailing list