|
@@ -927,16 +927,22 @@ int CContactlessCardFSM::AcceptCard(SpReqAnsContext<ContactlessCardService_Inser
|
|
|
// -1和-2是上电或APDU交互失败,功能集循环调用
|
|
|
if (retDetectAndRead == -1){
|
|
|
|
|
|
- SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_ActiveContactlessICCard, "DevAdapter::ActiveContactlessICCard", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_ActiveContactlessICCard, "DevAdapter::ActiveContactlessICCard", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
ctx->Answer(Error_Interact, GetAlarmDEC());
|
|
|
}
|
|
|
else if (retDetectAndRead == -2){
|
|
|
|
|
|
- SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
ctx->Answer(Error_Interact, GetAlarmDEC());
|
|
|
}else if (retDetectAndRead == -3){
|
|
|
|
|
|
- SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
ctx->Answer(Error_Interact, GetAlarmDEC());
|
|
|
}
|
|
|
return 2;
|
|
@@ -953,7 +959,9 @@ int CContactlessCardFSM::AcceptCard(SpReqAnsContext<ContactlessCardService_Inser
|
|
|
eErr = m_hDevHelper->HaltCard();
|
|
|
l_endTime = SP::Module::Comm::RVCGetTickCount();
|
|
|
if(Error_Succeed != eErr){
|
|
|
- SetErrorAndLog(eErr, MEC_DEVAPI_RF_HaltCard, "DevAdapter::HaltCard", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(eErr, MEC_DEVAPI_RF_HaltCard, "DevAdapter::HaltCard", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
}
|
|
|
ctx->Answer(Error_Interact);//can't find track2,retry 20150128
|
|
|
}
|
|
@@ -1096,17 +1104,20 @@ int CContactlessCardFSM::PreOnline(SpReqAnsContext<ContactlessCardService_PreOnl
|
|
|
{
|
|
|
// -1和-2是上电或APDU交互失败,功能集循环调用
|
|
|
if (retDetectAndRead == -1){
|
|
|
-
|
|
|
- SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_ActiveContactlessICCard, "DevAdapter::ActiveContactlessICCard", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_ActiveContactlessICCard, "DevAdapter::ActiveContactlessICCard", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
ctx->Answer(Error_Interact, AlarmDEC());
|
|
|
}
|
|
|
else if (retDetectAndRead == -2){
|
|
|
-
|
|
|
- SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
ctx->Answer(Error_Interact, AlarmDEC());
|
|
|
}else if (retDetectAndRead == -3){
|
|
|
-
|
|
|
- SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ if (!ctx->Req.reserved1.IsNullOrEmpty() && ctx->Req.reserved1.Compare("P") == 0) {
|
|
|
+ SetErrorAndLog(Error_Unexpect, MEC_DEVAPI_RF_RFTypeABCommand, "DevAdapter::RFTypeABCommand", __FUNCTION__, false, l_endTime - l_beginTime, "", "");
|
|
|
+ }
|
|
|
ctx->Answer(Error_Interact, AlarmDEC());
|
|
|
}
|
|
|
return 0;
|