[Pcsclite-cvs-commit] r2911 - /trunk/Drivers/ccid/src/ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Apr 25 07:28:04 UTC 2008


Author: rousseau
Date: Fri Apr 25 07:28:02 2008
New Revision: 2911

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2911
Log:
init_driver(): use the environment variable LIBCCID_ifdLogLevel to
overwrite the value of ifdLogLevel read from the Info.plist file

Thanks to Alon Bar-Lev for the idea

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=2911&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Fri Apr 25 07:28:02 2008
@@ -1315,6 +1315,7 @@
 {
 	char keyValue[TOKEN_MAX_VALUE_SIZE];
 	char infofile[FILENAME_MAX];
+	char *e;
 
 	/* Info.plist full patch filename */
 	snprintf(infofile, sizeof(infofile), "%s/%s/Contents/Info.plist",
@@ -1330,6 +1331,16 @@
 		DEBUG_INFO2("LogLevel: 0x%.4X", LogLevel);
 	}
 
+	e = getenv("LIBCCID_ifdLogLevel");
+	if (e)
+	{
+		/* convert from hex or dec or octal */
+		LogLevel = strtoul(e, NULL, 0);
+
+		/* print the log level used */
+		DEBUG_INFO2("LogLevel from LIBCCID_ifdLogLevel: 0x%.4X", LogLevel);
+	}
+	
 	/* Driver options */
 	if (0 == LTPBundleFindValueWithKey(infofile, "ifdDriverOptions", keyValue, 0))
 	{




More information about the Pcsclite-cvs-commit mailing list