[Pcsclite-cvs-commit] r5727 - /trunk/Drivers/ccid/src/ifdhandler.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Mon May 9 13:17:40 UTC 2011
Author: rousseau
Date: Mon May 9 13:17:37 2011
New Revision: 5727
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5727
Log:
init_driver(): do not fail if the Info.plist file is not found
This may happen if the driver for the serial GemPC Twin is used but
the USB driver is NOT installed (no .bundle directory).
Thanks to Frederic Dumas for the bug report.
Modified:
trunk/Drivers/ccid/src/ifdhandler.c
Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=5727&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Mon May 9 13:17:37 2011
@@ -1754,18 +1754,31 @@
PCSCLITE_HP_DROPDIR, BUNDLE);
rv = bundleParse(infofile, &plist);
- if (rv)
- return;
-
- /* Log level */
- rv = LTPBundleFindValueWithKey(&plist, "ifdLogLevel", &values);
if (0 == rv)
{
- /* convert from hex or dec or octal */
- LogLevel = strtoul(list_get_at(values, 0), NULL, 0);
-
- /* print the log level used */
- DEBUG_INFO2("LogLevel: 0x%.4X", LogLevel);
+ /* Log level */
+ rv = LTPBundleFindValueWithKey(&plist, "ifdLogLevel", &values);
+ if (0 == rv)
+ {
+ /* convert from hex or dec or octal */
+ LogLevel = strtoul(list_get_at(values, 0), NULL, 0);
+
+ /* print the log level used */
+ DEBUG_INFO2("LogLevel: 0x%.4X", LogLevel);
+ }
+
+ /* Driver options */
+ rv = LTPBundleFindValueWithKey(&plist, "ifdDriverOptions", &values);
+ if (0 == rv)
+ {
+ /* convert from hex or dec or octal */
+ DriverOptions = strtoul(list_get_at(values, 0), NULL, 0);
+
+ /* print the log level used */
+ DEBUG_INFO2("DriverOptions: 0x%.4X", DriverOptions);
+ }
+
+ bundleRelease(&plist);
}
e = getenv("LIBCCID_ifdLogLevel");
@@ -1777,19 +1790,6 @@
/* print the log level used */
DEBUG_INFO2("LogLevel from LIBCCID_ifdLogLevel: 0x%.4X", LogLevel);
}
-
- /* Driver options */
- rv = LTPBundleFindValueWithKey(&plist, "ifdDriverOptions", &values);
- if (0 == rv)
- {
- /* convert from hex or dec or octal */
- DriverOptions = strtoul(list_get_at(values, 0), NULL, 0);
-
- /* print the log level used */
- DEBUG_INFO2("DriverOptions: 0x%.4X", DriverOptions);
- }
-
- bundleRelease(&plist);
/* get the voltage parameter */
switch ((DriverOptions >> 4) & 0x03)
More information about the Pcsclite-cvs-commit
mailing list