|
|
@@ -727,6 +727,8 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
LOG_IDCER_ERROR_MSG_MACRO(eErr, IDCerAuthenticate);
|
|
|
dwEnd = GetTickCount();
|
|
|
elapsed = dwEnd - dwStart;
|
|
|
+ if (eErr == Error_DevMedia)
|
|
|
+ break;
|
|
|
continue;
|
|
|
}
|
|
|
else
|
|
|
@@ -782,7 +784,7 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
,(const char*)ctx->Ans.idcode.SubString(0, 4), (const char*)ctx->Ans.idcode.SubString(ctx->Ans.idcode.GetLength() - 1, 1));
|
|
|
*/
|
|
|
Dbg("to get photo");
|
|
|
- GetPngBlobEx(ctx->Ans.headphoto, "zp");
|
|
|
+ GetPngBlobEx(ctx->Ans.headphoto, "zp", true);
|
|
|
eErr = GetPngBlob(ctx->Ans.photodata, true);
|
|
|
if (eErr != Error_Succeed)
|
|
|
{
|
|
|
@@ -831,12 +833,12 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
{
|
|
|
//idfront.bmp" and "idback.bmp
|
|
|
ErrorCodeEnum eErrFront, eErrBack;
|
|
|
- eErrFront = GetPngBlobEx(ctx->Ans.frontphoto, "idfront");
|
|
|
+ eErrFront = GetPngBlobEx(ctx->Ans.frontphoto, "idfront", true);
|
|
|
eErrBack = GetPngBlobEx(ctx->Ans.backphoto, "idback", true);
|
|
|
if (eErrFront == Error_Succeed && eErrBack == Error_Succeed)
|
|
|
ctx->Ans.hasscan = 1;
|
|
|
}
|
|
|
- GetPngBlobEx(ctx->Ans.headphoto, "zp");
|
|
|
+ GetPngBlobEx(ctx->Ans.headphoto, "zp", true);
|
|
|
|
|
|
Dbg("Name:%s,Sex:%s,Nation:%s,Birthday:%s,StartDate:%s,EndDate:%s,IDNo:%s****%s,Address:%s,IDType:%s,Department:%s,EnglishName:%s,Nationality:%s"
|
|
|
, (const char*)ctx->Ans.name, (const char*)ctx->Ans.sex, (const char*)ctx->Ans.nation
|
|
|
@@ -926,6 +928,8 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
ctx->Answer(Error_Cancel);
|
|
|
else if (elapsed >= IDCER_READ_TIMEOUT)
|
|
|
ctx->Answer(Error_TimeOut);
|
|
|
+ else if (eErr == Error_DevMedia)
|
|
|
+ ctx->Answer(Error_DevMedia);
|
|
|
else
|
|
|
ctx->Answer(Error_Unexpect);
|
|
|
if (eErr1 == Error_Succeed && pos == 2)
|