|
@@ -1775,30 +1775,29 @@ int CIDCertFSM::ReadAndScanUTF8JS(SpReqAnsContext<IDCert_ReadAndScanUTF8JS_Req,
|
|
|
|
|
|
SetErrorAndLog(errReadEx2, MEC_DEVAPI_IDCER_IDCerGetDataEx2, "DevAdapter::IDCerGetDataEx2", __FUNCTION__,
|
|
|
true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Invoke IDCerGetDataEx2(Timeout) failed: %s", SpStrError(eErr));
|
|
|
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA2109")
|
|
|
- ("Invoke IDCerGetDataEx2(Timeout) failed: %s", SpStrError(eErr));
|
|
|
-
|
|
|
- ctx->Answer(Error_TimeOut);
|
|
|
+ ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerGetDataEx2);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- SetErrorAndLog(errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate, "DevAdapter::IDCerAuthenticate", __FUNCTION__,
|
|
|
- true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2107
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).
|
|
|
- setResultCode("RTA2107")
|
|
|
- ("ReadAndScanUTF8::IDCerAuthenticate(Timeout) failed with errcode: %d", errAuth);
|
|
|
-
|
|
|
- ctx->Answer(Error_TimeOut);
|
|
|
+
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ReadAndScanUTF8::IDCerAuthenticate(Timeout) failed with errcode: %d", errAuth);
|
|
|
+ if (errAuth == Error_DevMedia)
|
|
|
+ {
|
|
|
+ SetErrorAndLog(errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate_NotIDCard, "DevAdapter::IDCerAuthenticate", __FUNCTION__,
|
|
|
+ true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2108
|
|
|
+ ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerAuthenticate_NotIDCard);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SetErrorAndLog(errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate, "DevAdapter::IDCerAuthenticate", __FUNCTION__,
|
|
|
+ true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2107
|
|
|
+ ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerAuthenticate);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI("DevAdapter::IDCerGetDataEx2").setLogCode("QLR040220106").setResultCode("RTA2104");
|
|
|
- ctx->Answer(Error_Unexpect, IDCertificate_UserErrorCode_ReadAndScan_Failed);
|
|
|
- LogError(Severity_High, Error_Unexpect, IDCertificate_UserErrorCode_ReadAndScan_Failed, "ReadAndScanUTF8JS some thing wrong.");
|
|
|
- }
|
|
|
|
|
|
if (eErr1 == Error_Succeed && pos == 2)
|
|
|
{
|