|
@@ -243,7 +243,7 @@ unsigned int CCustMngrAuthFSM::s3_on_event(FSMEvent* pEvt)
|
|
|
m_bCancelAuthorize = true;
|
|
|
m_pFingerPrint->GetFunction()->CloseSession();
|
|
|
//m_pFingerPrint->SafeDelete();
|
|
|
- m_pFingerPrint = NULL;
|
|
|
+ //m_pFingerPrint = NULL;
|
|
|
}
|
|
|
|
|
|
m_authCtx.eAuthByWhich = AuthByNone;
|
|
@@ -366,6 +366,7 @@ ErrorCodeEnum CCustMngrAuthFSM::SwitchUSB(bool bOpen)
|
|
|
if (errCode != Error_Succeed)
|
|
|
{
|
|
|
Dbg("m_pDeviceControl connect failed with errCode(%s)", SpStrError(errCode));
|
|
|
+ m_pDeviceControl->SafeDelete();
|
|
|
}else {
|
|
|
if (bOpen)
|
|
|
Dbg("Open USB");
|
|
@@ -384,7 +385,7 @@ ErrorCodeEnum CCustMngrAuthFSM::SwitchUSB(bool bOpen)
|
|
|
m_pDeviceControl->GetFunction()->CloseSession();
|
|
|
}
|
|
|
//m_pDeviceControl->SafeDelete();
|
|
|
- m_pDeviceControl = NULL;
|
|
|
+ //m_pDeviceControl = NULL;
|
|
|
return errCode;
|
|
|
}
|
|
|
else {
|
|
@@ -1336,11 +1337,7 @@ ErrorCodeEnum CCustMngrAuthFSM::ConnectFingerPrintEntity()
|
|
|
if (errCode != Error_Succeed)
|
|
|
{
|
|
|
Dbg("ERROR: connect to fingerprint entity failed!");
|
|
|
- if (m_pFingerPrint != NULL)
|
|
|
- {
|
|
|
- //m_pFingerPrint->SafeDelete();
|
|
|
- m_pFingerPrint = NULL;
|
|
|
- }
|
|
|
+ m_pFingerPrint->SafeDelete();
|
|
|
|
|
|
errCode = Error_NoTarget; //TODO::give one other errCode
|
|
|
}
|
|
@@ -1423,7 +1420,7 @@ ErrorCodeEnum CCustMngrAuthFSM::MatchProcess(MatchParams* matchParam, bool& bSto
|
|
|
return Error_Unexpect;
|
|
|
}
|
|
|
//fingerprint entity may not return immediately
|
|
|
- std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
|
|
+ SLEEP(100);
|
|
|
|
|
|
Dbg("begin next invoke match.");
|
|
|
errCode = m_pFingerPrint->Match(matchParam->sMatchReq, matchParam->sMatchAns, 20000);
|