@@ -856,13 +856,15 @@ bool CAuthorize_CDKey::Authorize_CDKey_UserRegister(XENGINE_AUTHORIZE_LOCAL* pSt
856856 if (0 == _tcsxncmp (pSt_AuthLocal->st_AuthSerial .st_TimeLimit .tszTimeSerial , lpszSerialStr, _tcsxlen (pSt_AuthLocal->st_AuthSerial .st_TimeLimit .tszTimeSerial )))
857857 {
858858 // 次数验证
859+ bSerial = true ;
859860 pSt_AuthLocal->st_AuthRegInfo .enSerialType = ENUM_AUTHORIZE_MODULE_SERIAL_TYPE_TIME;
860861 pSt_AuthLocal->st_AuthRegInfo .enRegType = ENUM_AUTHORIZE_MODULE_CDKEY_TYPE_OFFICIAL;
861862 Authorize_CDKey_BuildKeyTime (pSt_AuthLocal, pSt_AuthLocal->st_AuthSerial .st_TimeLimit .nTimeCount );
862863 }
863864 else if (0 == _tcsxncmp (pSt_AuthLocal->st_AuthSerial .st_DataLimit .tszDataSerial , lpszSerialStr, _tcsxlen (pSt_AuthLocal->st_AuthSerial .st_DataLimit .tszDataSerial )))
864865 {
865866 // 日期序列
867+ bSerial = true ;
866868 pSt_AuthLocal->st_AuthRegInfo .enSerialType = ENUM_AUTHORIZE_MODULE_SERIAL_TYPE_CUSTOM;
867869 pSt_AuthLocal->st_AuthRegInfo .enRegType = ENUM_AUTHORIZE_MODULE_CDKEY_TYPE_OFFICIAL;
868870 XENGINE_LIBTIMER st_LibTime = {};
@@ -909,6 +911,7 @@ bool CAuthorize_CDKey::Authorize_CDKey_UserRegister(XENGINE_AUTHORIZE_LOCAL* pSt
909911 Authorize_dwErrorCode = ERROR_AUTHORIZE_MODULE_CDKEY_FAILED;
910912 return false ;
911913 }
914+ BaseLib_OperatorTime_TimeToStr (pSt_AuthLocal->st_AuthRegInfo .tszRegisterTime );
912915 return true ;
913916}
914917/* *******************************************************************
@@ -984,15 +987,7 @@ bool CAuthorize_CDKey::Authorize_CDKey_GetLeftTimer(XENGINE_AUTHORIZE_LOCAL* pSt
984987 else
985988 {
986989 // 其他类型的注册机制
987- if (pSt_AuthLocal->st_AuthRegInfo .nHasTime <= 0 )
988- {
989- Authorize_IsErrorOccur = true ;
990- Authorize_dwErrorCode = ERROR_AUTHORIZE_MODULE_CDKEY_NOTHASTIME;
991- return false ;
992- }
993990 BaseLib_OperatorTime_GetSysTime (&st_SysTimer);
994- // 转换时间格式
995- _stxscanf (pSt_AuthLocal->st_AuthRegInfo .tszRegisterTime , _X (" %04d-%02d-%02d %02d:%02d:%02d" ), &st_StartTimer.wYear , &st_StartTimer.wMonth , &st_StartTimer.wDay , &st_StartTimer.wHour , &st_StartTimer.wMinute , &st_StartTimer.wSecond );
996991 // 计算超时时间
997992 if (ENUM_AUTHORIZE_MODULE_SERIAL_TYPE_SECOND == pSt_AuthLocal->st_AuthRegInfo .enSerialType )
998993 {
@@ -1021,7 +1016,7 @@ bool CAuthorize_CDKey::Authorize_CDKey_GetLeftTimer(XENGINE_AUTHORIZE_LOCAL* pSt
10211016 Authorize_dwErrorCode = ERROR_AUTHORIZE_MODULE_CDKEY_NOTSUPPORT;
10221017 return false ;
10231018 }
1024- if (pSt_AuthLocal->st_AuthRegInfo .nHasTime <= 0 )
1019+ if (pSt_AuthLocal->st_AuthRegInfo .nHasTime < 0 )
10251020 {
10261021 Authorize_IsErrorOccur = true ;
10271022 Authorize_dwErrorCode = ERROR_AUTHORIZE_MODULE_CDKEY_TIMEOUT;
0 commit comments