Author: jmagne
Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1227
Modified Files:
Tag: PKI_8_0_RTM_BRANCH
SmartCardMonitoringThread.cpp SmartCardMonitoringThread.h
Log Message:
Bug 530633 - ESC on 64 bit Windows does not recognize Gemalto token insert event.
Index: SmartCardMonitoringThread.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.cpp,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- SmartCardMonitoringThread.cpp 6 Jun 2009 00:23:13 -0000 1.5
+++ SmartCardMonitoringThread.cpp 17 Nov 2009 23:40:53 -0000 1.5.2.1
@@ -33,7 +33,7 @@
static PRLogModuleInfo *coolKeyLogSC = PR_NewLogModule("coolKeySmart");
SmartCardMonitoringThread::SmartCardMonitoringThread(SECMODModule *aModule)
- : mModule(aModule), mThread(NULL)
+ : mModule(aModule), mThread(NULL), mGoingAway(0)
{
char tBuff[56];
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
@@ -67,6 +67,7 @@
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
("%s SmartCardMonitoringThread::Stop : \n",GetTStamp(tBuff,56)));
+ mGoingAway = 1;
Interrupt();
}
@@ -104,9 +105,9 @@
char tBuff[56];
PK11SlotInfo *slot;
- #ifdef LINUX
- sleep(3);
- #endif
+ //Give the rest of the systems time to come up properly
+
+ PR_Sleep(PR_SecondsToInterval(3));
PR_LOG( coolKeyLogSC, PR_LOG_DEBUG,
("%s SmartCardMonitoringThread::Execute.\n",GetTStamp(tBuff,56)));
@@ -116,6 +117,7 @@
/* PK11SlotList *sl =
PK11_FindSlotsByNames(mModule->dllName, NULL, NULL, PR_TRUE);
PK11SlotListElement *sle;
+
if (sl) {
@@ -142,6 +144,11 @@
PR_LOG( coolKeyLogSC, PR_LOG_ERROR,
("%s SmartCard thread event detected, but the slot is
NULL.\n",GetTStamp(tBuff,56)));
+ if(!mGoingAway) {
+ PR_Sleep(PR_SecondsToInterval(2));
+ continue;
+ }
+
break;
}
Index: SmartCardMonitoringThread.h
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.8.1
diff -u -r1.1.1.1 -r1.1.1.1.8.1
--- SmartCardMonitoringThread.h 12 Jun 2006 23:39:52 -0000 1.1.1.1
+++ SmartCardMonitoringThread.h 17 Nov 2009 23:40:53 -0000 1.1.1.1.8.1
@@ -45,7 +45,8 @@
void Remove(CoolKeyInfo *info);
static void LaunchExecute(void *arg);
-
+
+ int mGoingAway;
SECMODModule *mModule;
PRThread* mThread;
char* mCurrentActivation;
Show replies by date