|
|
@@ -846,6 +846,7 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
|
|
|
{
|
|
|
LOG_FUNCTION();
|
|
|
|
|
|
+ Dbg("ctx->Req.times = %d", ctx->Req.times);
|
|
|
if (ctx->Req.times <= 0 || ctx->Req.times > 10)
|
|
|
{
|
|
|
ctx->Answer(Error_Param);
|
|
|
@@ -857,8 +858,10 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
|
|
|
|
|
|
errCode = InitCommParam(pScanParam, RegisterType, ctx->Req.times);
|
|
|
|
|
|
- if (errCode != Error_Succeed)
|
|
|
+ if (errCode != Error_Succeed) {
|
|
|
+ Dbg("InitCommParam with EC = 0x%x(%s)", errCode, SpStrError(errCode));
|
|
|
ctx->Answer(errCode);
|
|
|
+ }
|
|
|
else {
|
|
|
CollectProcess(pScanParam, ctx);
|
|
|
if (pScanParam != NULL && ctx != NULL)
|
|
|
@@ -900,7 +903,7 @@ void CFingerPrintFSM::CollectProcess(ScanParam* pScanParam, SpReqAnsContext<Fing
|
|
|
{
|
|
|
Dbg("Invoke routine 'Image2Feature' success while GetFingerPrint.");
|
|
|
Dbg("FingerPrint feature length is %d", pScanParam->m_FeatureLen);
|
|
|
- Dbg("before add eof, feature = %s", (LPCTSTR)pScanParam->m_Feature);
|
|
|
+ //Dbg("before add eof, feature = %s", (LPCTSTR)pScanParam->m_Feature);
|
|
|
SLEEP(200);
|
|
|
Dbg("pScanParam->m_FullFilePath = %s", pScanParam->m_FullFilePath.GetData());
|
|
|
if (ExistsFile(pScanParam->m_FullFilePath)
|
|
|
@@ -909,7 +912,7 @@ void CFingerPrintFSM::CollectProcess(ScanParam* pScanParam, SpReqAnsContext<Fing
|
|
|
{
|
|
|
ctx->Ans.imageName = fileName;
|
|
|
pScanParam->m_Feature[STANDARD_FEATURE_LEN] = '\0';
|
|
|
- Dbg("after add eof, feature = %s", (LPCTSTR)pScanParam->m_Feature);
|
|
|
+ //Dbg("after add eof, feature = %s", (LPCTSTR)pScanParam->m_Feature);
|
|
|
ctx->Ans.feature = (LPCTSTR)pScanParam->m_Feature;
|
|
|
pScanParam->m_bGetFingerPrintSuc = true;
|
|
|
break;
|
|
|
@@ -947,6 +950,7 @@ void CFingerPrintFSM::CollectProcess(ScanParam* pScanParam, SpReqAnsContext<Fing
|
|
|
|
|
|
void CFingerPrintFSM::ProcessAfterCollect(ScanParam* pScanParam, SpReqAnsContext<FingerPrintService_GetFingerPrint_Req, FingerPrintService_GetFingerPrint_Ans>::Pointer& ctx)
|
|
|
{
|
|
|
+ LOG_FUNCTION();
|
|
|
ctx->Ans.reserved1.Init(10);
|
|
|
if (pScanParam->m_bGetFingerPrintSuc)
|
|
|
{
|
|
|
@@ -1048,9 +1052,9 @@ int CFingerPrintFSM::GenerateTemplate(SpReqAnsContext<FingerPrintService_Generat
|
|
|
Dbg("Invoke routine 'Image2Template' success");
|
|
|
Dbg("template length is %d", lpbLength);
|
|
|
if (lpbTemplate != NULL && lpbLength == STANDARD_FEATURE_LEN) {
|
|
|
- Dbg("before add eof, template = %s", (LPCTSTR)lpbTemplate);
|
|
|
+ //Dbg("before add eof, template = %s", (LPCTSTR)lpbTemplate);
|
|
|
lpbTemplate[lpbLength] = '\0';
|
|
|
- Dbg("after add eof, template = %s", (LPCTSTR)lpbTemplate);
|
|
|
+ //Dbg("after add eof, template = %s", (LPCTSTR)lpbTemplate);
|
|
|
ctx->Ans.templateFeature = (LPCTSTR)lpbTemplate;
|
|
|
}
|
|
|
else {
|
|
|
@@ -1272,6 +1276,7 @@ ErrorCodeEnum CFingerPrintFSM::MatchProcess(ScanParam* initParam, SpReqAnsContex
|
|
|
|
|
|
ErrorCodeEnum CFingerPrintFSM::InitCommParam(ScanParam* initParam, int operateType, int scanTime, int templateNum)
|
|
|
{
|
|
|
+ LOG_FUNCTION();
|
|
|
ErrorCodeEnum errCode = Error_Succeed;
|
|
|
|
|
|
if (!initParam)
|
|
|
@@ -1284,6 +1289,7 @@ ErrorCodeEnum CFingerPrintFSM::InitCommParam(ScanParam* initParam, int operateTy
|
|
|
{
|
|
|
if (m_bCancelRegister) //no cancel button anymore while register
|
|
|
{
|
|
|
+ Dbg("cancel flag");
|
|
|
m_bCancelRegister = false;
|
|
|
errCode = Error_Cancel;
|
|
|
}
|
|
|
@@ -1338,6 +1344,7 @@ ErrorCodeEnum CFingerPrintFSM::InitCommParam(ScanParam* initParam, int operateTy
|
|
|
errCode = m_pEntity->GetFunction()->GetPath("Dep", initParam->m_DepPath);
|
|
|
if (errCode != Error_Succeed)
|
|
|
{
|
|
|
+ Dbg("operateType = %d", RegisterType);
|
|
|
delete[] initParam->m_Feature;
|
|
|
initParam->m_Feature = NULL;
|
|
|
|