|
@@ -812,8 +812,6 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
Dbg("IDCerAuthenticate failed: %s", SpStrError(ecForIDCerAuthenticate));
|
|
|
dwEnd = RVCGetTickCount();
|
|
|
elapsed = dwEnd - dwStart;
|
|
|
- if (eErr == Error_DevMedia)
|
|
|
- break;
|
|
|
continue;
|
|
|
}
|
|
|
else
|
|
@@ -985,8 +983,6 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
if (eErr1 == Error_Succeed)
|
|
|
{
|
|
|
Dbg("pos after eject:%d", pos);
|
|
|
- /*if (pos == 2)
|
|
|
- return 4;*/
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -997,26 +993,24 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
}
|
|
|
|
|
|
//zjw@20191219 处理完相关操作再返回给前端,防止状态还未跳转又发起流程
|
|
|
- if (bGetIDCert)
|
|
|
+ if (bGetIDCert) {
|
|
|
ctx->Answer(Error_Succeed);
|
|
|
- else if (m_bCancelRead)
|
|
|
+ } else if (m_bCancelRead) {
|
|
|
ctx->Answer(Error_Cancel);
|
|
|
- else if (elapsed >= IDCER_READ_TIMEOUT) {
|
|
|
+ LogWarn(Severity_Low, Error_Debug, IDCertificate_UserErrorCode_CancelOperation, "User cancel read IDCard from front.");
|
|
|
+ } else if (elapsed >= IDCER_READ_TIMEOUT) {
|
|
|
ctx->Answer(Error_TimeOut);
|
|
|
|
|
|
if (ecForIDCerRFControl != Error_Succeed) {
|
|
|
- SetErrPackage(m_errPkg, "ReadAndScan::IDCerRFControl", m_devSN, ecForIDCerRFControl, MEC_DEVAPI_IDCER_IDCerRFControl);
|
|
|
+ SetErrPackage(m_errPkg, "ReadAndScan::IDCerRFControl(Timeout)", m_devSN, ecForIDCerRFControl, MEC_DEVAPI_IDCER_IDCerRFControl);
|
|
|
AlarmDEC(m_errPkg);
|
|
|
}
|
|
|
if (ecForIDCerAuthenticate != Error_Succeed) {
|
|
|
- SetErrPackage(m_errPkg, "ReadAndScan::IDCerAuthenticate", m_devSN, ecForIDCerAuthenticate, MEC_DEVAPI_IDCER_IDCerAuthenticate);
|
|
|
+ SetErrPackage(m_errPkg, "ReadAndScan::IDCerAuthenticate(Timeout)", m_devSN, ecForIDCerAuthenticate, MEC_DEVAPI_IDCER_IDCerAuthenticate);
|
|
|
AlarmDEC(m_errPkg);
|
|
|
}
|
|
|
- }
|
|
|
- else if (eErr == Error_DevMedia) {
|
|
|
- LogWarn(Severity_High, Error_DevMedia, IDCertificate_UserErrorCode_ErrorDevMedia, "Error DevMedia");
|
|
|
- ctx->Answer(Error_DevMedia);
|
|
|
} else {
|
|
|
+
|
|
|
ctx->Answer(Error_Unexpect);
|
|
|
|
|
|
if (ecForIDCerRFControl != Error_Succeed) {
|