From f080a22d8adc0869591cc21751331c75aa2a79ed Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Thu, 30 Sep 2010 20:45:16 +0000 Subject: [PATCH] sending description about the running configuration via usb descriptor git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@290 96b47cad-a561-4643-ad3b-153ac7d7599c --- ccid/src/usb.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/ccid/src/usb.c b/ccid/src/usb.c index 89e888d..bd5d402 100644 --- a/ccid/src/usb.c +++ b/ccid/src/usb.c @@ -44,6 +44,7 @@ #include #endif +#include "config.h" #include "usbstring.h" #include "ccid.h" #include "binutil.h" @@ -285,12 +286,18 @@ static const struct usb_endpoint_descriptor *hs_eps [] = { /* 56 is the maximum for the KOBIL Class 3 Reader */ static char serial [57]; +static const char interrupt_on_string[] = "Insertion and removal events enabled"; +static const char interrupt_off_string[] = "Insertion and removal events disabled"; static struct usb_string stringtab [] = { - { STRINGID_MFGR, "morgner@informatik.hu-berlin.de", }, + { STRINGID_MFGR, "Virtual Smart Card Architecture", }, { STRINGID_PRODUCT, "CCID Emulator", }, { STRINGID_SERIAL, serial, }, - { STRINGID_CONFIG, "", }, - { STRINGID_INTERFACE, "", }, +#ifdef WITH_PACE + { STRINGID_CONFIG, "PACE support enabled", }, +#else + { STRINGID_CONFIG, "PACE support disabled", }, +#endif + { STRINGID_INTERFACE, interrupt_on_string, }, { STRINGID_HID_INTERFACE, "Human Device Interface Gadget", }, }; @@ -585,6 +592,13 @@ static int autoconfig () } if (!doint) { source_sink_intf.bNumEndpoints = 2; + int i; + for (i=0; i