[Pcsclite-cvs-commit] PCSC/src tokenfactory.c,1.13,1.14
rousseau@quantz.debian.org
rousseau@quantz.debian.org
Tue, 30 Sep 2003 21:56:16 +0200
Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv22175
Modified Files:
tokenfactory.c
Log Message:
print the directory name with the error message if opendir failed
Index: tokenfactory.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/tokenfactory.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- tokenfactory.c 8 Sep 2003 08:50:50 -0000 1.13
+++ tokenfactory.c 30 Sep 2003 19:56:14 -0000 1.14
@@ -23,6 +23,7 @@
#include "debuglog.h"
#include "dyn_generic.h"
#include "tokenfactory.h"
+#include "parser.h"
#ifndef WIN32
#ifndef MSC_SVC_DROPDIR
@@ -123,7 +124,6 @@
MSCLong32 TPSearchBundlesForAtr(MSCPUChar8 Atr, MSCULong32 Length,
MSCLPTokenInfo tokenInfo)
{
-
MSCLong32 rv;
#ifndef WIN32
@@ -135,10 +135,10 @@
char findPath[200];
#endif
- char atrString[100];
+ char atrString[MAX_ATR_SIZE];
char fullPath[200];
char fullLibPath[250];
- char keyValue[200];
+ char keyValue[TOKEN_MAX_VALUE_SIZE];
int atrIndex;
rv = 0;
@@ -150,17 +150,21 @@
hpDir = opendir(MSC_SVC_DROPDIR);
if (hpDir == 0)
+ {
+ DebugLogB("Cannot open PC/SC token drivers directory: %s",
+ MSC_SVC_DROPDIR);
+ return -1;
+ }
#else
sprintf(findPath, "%s\\*.bundle", MSC_SVC_DROPDIR);
hFind = FindFirstFile(findPath, &findData);
if (hFind == INVALID_HANDLE_VALUE)
-#endif
{
- DebugLogA("Cannot open PC/SC token drivers directory.");
-
+ DebugLogB("Cannot open PC/SC token drivers directory: %s", findPath);
return -1;
}
+#endif
#ifndef WIN32
while ((currFP = readdir(hpDir)) != 0)