|
@@ -155,8 +155,13 @@ public:
|
|
|
void QueryFunc(SpReqAnsContext<PinPadService_QueryFunc_Req, PinPadService_QueryFunc_Ans>::Pointer ctx)
|
|
|
{
|
|
|
LOG_FUNCTION();
|
|
|
- m_fsm.GetEncryptKey(ctx->Ans.encryptkey,ctx->Ans.reserved1);
|
|
|
- ctx->Answer(Error_Succeed);
|
|
|
+ if (m_fsm.GetDevInitFlag())
|
|
|
+ {
|
|
|
+ m_fsm.GetEncryptKey(ctx->Ans.encryptkey, ctx->Ans.reserved1);
|
|
|
+ ctx->Answer(Error_Succeed);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ ctx->Answer(Error_DevNotAvailable);
|
|
|
}
|
|
|
void GetCheckCode(SpReqAnsContext<PinPadService_GetCheckCode_Req, PinPadService_GetCheckCode_Ans>::Pointer ctx)
|
|
|
{
|