Explorar o código

Z991239-5406 #comment 增加密钥序号不一致的告警上送

oilyang hai 1 ano
pai
achega
5f0ea8f1a1

+ 2 - 0
Module/mod_pinpad/PinPadFSM.cpp

@@ -472,6 +472,8 @@ int CPinPadFSM::Initial()
 		if (infile.is_open())
 			infile.read(buffer, 16);
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("bak.sn:%s", buffer);
+		if (strlen(buffer) > 0 && m_keySNSM.Compare(buffer) != 0)
+			LogWarn(Severity_High, Error_Unexpect, PinPad_UserErrorCode_PinPad_SN_NOTMATCH, CSimpleStringA::Format("m_keySN:%s,snbak:%s", m_keySNSM.GetData(), buffer));
 		delete[] buffer;
 		infile.close();
 	}

+ 1 - 1
Module/mod_pinpad/PinPad_UserErrorCode.h

@@ -32,7 +32,7 @@ enum PinPad_UserErrorCode {
 	PinPad_UserErrorCode_PinPad_GetEncryptText_Get12Account_Error = 0x2060021B,
 	PinPad_UserErrorCode_PinPad_DevOpenFailed = 0x2060021C,
 	PinPad_UserErrorCode_PinPad_CkCode_While_Load_SM = 0x2060021D,
-		
+	PinPad_UserErrorCode_PinPad_SN_NOTMATCH = 0x2060021E,
 	PinPad_UserErrorCode_PinPad_Real_Root_Config = 0x2060021F,
 	PinPad_UserErrorCode_PinPad_GetPinBlock_Call = 0x20600220,
 	PinPad_UserErrorCode_Unexpected_Exit = 0x20600221,