Skip to content

Commit 97145f2

Browse files
committed
delete rename configure module
1 parent 5bdaf98 commit 97145f2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

XEngine_Source/StorageModule_Config/Config_Define.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ typedef struct tag_XEngine_ServerConfig
6363
}st_XSql;
6464
struct
6565
{
66-
BOOL bRename;
6766
BOOL bResumable;
6867
int nHashMode;
6968
TCHAR tszFileDir[MAX_PATH];

XEngine_Source/StorageModule_Config/Config_Error.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#define ERROR_XENGINE_BLOGIC_CONFIG_JSON_XVER 0x0020008
2424
#define ERROR_XENGINE_BLOGIC_CONFIG_JSON_XPROXY 0x0020009
2525
#define ERROR_XENGINE_BLOGIC_CONFIG_JSON_P2XP 0x002000A
26+
#define ERROR_XENGINE_BLOGIC_CONFIG_JSON_CERT 0x002000B
2627

2728
#define ERROR_XENGINE_BLOGIC_CONFIG_JSON_LBCONFIG 0x0020010
2829
#define ERROR_XENGINE_BLOGIC_CONFIG_JSON_LAODBALANCE 0x0020011

XEngine_Source/StorageModule_Config/Config_Json/Config_Json.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
125125
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLPass, st_JsonXSql["SQLPass"].asCString());
126126
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLFile, st_JsonXSql["SQLFile"].asCString());
127127

128-
if (st_JsonRoot["XStorage"].empty() || (4 != st_JsonRoot["XStorage"].size()))
128+
if (st_JsonRoot["XStorage"].empty() || (3 != st_JsonRoot["XStorage"].size()))
129129
{
130130
Config_IsErrorOccur = TRUE;
131131
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_XSTORAGE;
@@ -134,7 +134,6 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
134134
Json::Value st_JsonXStorage = st_JsonRoot["XStorage"];
135135
pSt_ServerConfig->st_XStorage.nHashMode = st_JsonXStorage["nHashMode"].asInt();
136136
pSt_ServerConfig->st_XStorage.bResumable = st_JsonXStorage["bResumable"].asInt();
137-
pSt_ServerConfig->st_XStorage.bRename = st_JsonXStorage["bRename"].asInt();
138137
_tcscpy(pSt_ServerConfig->st_XStorage.tszFileDir, st_JsonXStorage["tszFileDir"].asCString());
139138

140139
if (st_JsonRoot["XProxy"].empty() || (2 != st_JsonRoot["XProxy"].size()))
@@ -183,16 +182,22 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
183182
if (st_JsonRoot["XCert"].empty() || (6 != st_JsonRoot["XCert"].size()))
184183
{
185184
Config_IsErrorOccur = TRUE;
186-
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_P2XP;
185+
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_CERT;
187186
return FALSE;
188187
}
189188
Json::Value st_JsonCert = st_JsonRoot["XCert"];
190189
pSt_ServerConfig->st_XCert.bDLEnable = st_JsonCert["bDLEnable"].asInt();
191190
pSt_ServerConfig->st_XCert.bUPEnable = st_JsonCert["bUPEnable"].asInt();
192191
pSt_ServerConfig->st_XCert.bCHEnable = st_JsonCert["bCHEnable"].asInt();
193192
pSt_ServerConfig->st_XCert.nSslType = st_JsonCert["nSslType"].asInt();
194-
_tcscpy(pSt_ServerConfig->st_XCert.tszCertChain, st_JsonP2xp["tszCertChain"].asCString());
195-
_tcscpy(pSt_ServerConfig->st_XCert.tszCertKey, st_JsonP2xp["tszCertKey"].asCString());
193+
if (!st_JsonP2xp["tszCertChain"].isNull())
194+
{
195+
_tcscpy(pSt_ServerConfig->st_XCert.tszCertChain, st_JsonP2xp["tszCertChain"].asCString());
196+
}
197+
if (!st_JsonP2xp["tszCertKey"].isNull())
198+
{
199+
_tcscpy(pSt_ServerConfig->st_XCert.tszCertKey, st_JsonP2xp["tszCertKey"].asCString());
200+
}
196201

197202
if (st_JsonRoot["XVer"].empty() || (1 != st_JsonRoot["XVer"].size()))
198203
{

0 commit comments

Comments
 (0)