Skip to content

Commit 7306edc

Browse files
committed
delete:loadblance ipaddr field
fixed:load json error
1 parent 4702c12 commit 7306edc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

XEngine_Source/StorageModule_Config/Config_Define.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ typedef struct tag_XEngine_ServerConfig
112112
}st_XVer;
113113
}XENGINE_SERVERCONFIG;
114114

115-
116115
typedef struct
117116
{
118117
TCHAR tszFilePath[MAX_PATH];
@@ -124,7 +123,6 @@ typedef struct
124123
}XENGINE_STORAGEBUCKET;
125124
typedef struct
126125
{
127-
TCHAR tszIPAddr[128];
128126
BOOL bDistributed;
129127
struct
130128
{

XEngine_Source/StorageModule_Config/Config_Json/Config_Json.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVERCONFIG
143143
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLPass, st_JsonXSql["SQLPass"].asCString());
144144
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLFile, st_JsonXSql["SQLFile"].asCString());
145145

146-
if (st_JsonRoot["XStorage"].empty() || (4 != st_JsonRoot["XStorage"].size()))
146+
if (st_JsonRoot["XStorage"].empty() || (3 != st_JsonRoot["XStorage"].size()))
147147
{
148148
Config_IsErrorOccur = TRUE;
149149
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_XSTORAGE;
@@ -291,7 +291,6 @@ BOOL CConfig_Json::Config_Json_LoadBalance(LPCTSTR lpszConfigFile, XENGINE_LBCON
291291
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_PARSE;
292292
return FALSE;
293293
}
294-
_tcscpy(pSt_ServerConfig->tszIPAddr, st_JsonRoot["tszIPAddr"].asCString());
295294
pSt_ServerConfig->bDistributed = st_JsonRoot["bDistributed"].asInt();
296295

297296
if (st_JsonRoot["LBConfig"].empty() || (1 != st_JsonRoot["LBConfig"].size()))
@@ -303,7 +302,7 @@ BOOL CConfig_Json::Config_Json_LoadBalance(LPCTSTR lpszConfigFile, XENGINE_LBCON
303302
Json::Value st_JsonLBConfig = st_JsonRoot["LBConfig"];
304303
pSt_ServerConfig->st_LBConfig.nServerMode = st_JsonLBConfig["nUseMode"].asInt();
305304

306-
if (st_JsonRoot["LoadBalance"].empty() || (4 != st_JsonRoot["LoadBalance"].size()))
305+
if (st_JsonRoot["LoadBalance"].empty() || (5 != st_JsonRoot["LoadBalance"].size()))
307306
{
308307
Config_IsErrorOccur = TRUE;
309308
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_LAODBALANCE;
@@ -345,8 +344,8 @@ BOOL CConfig_Json::Config_Json_LoadBalance(LPCTSTR lpszConfigFile, XENGINE_LBCON
345344
st_Bucket.bEnable = st_JsonBucket[i]["bEnable"].asInt();
346345
st_Bucket.nLevel = st_JsonBucket[i]["nLevel"].asInt();
347346
_tcscpy(st_Bucket.tszBuckSize, st_JsonBucket[i]["Size"].asCString());
348-
_tcscpy(st_Bucket.tszFilePath, st_JsonBucket[i]["XEngine_File"].asCString());
349347
_tcscpy(st_Bucket.tszBuckKey, st_JsonBucket[i]["XEngine_Key"].asCString());
348+
_tcscpy(st_Bucket.tszFilePath, st_JsonBucket[i]["XEngine_Path"].asCString());
350349

351350
pSt_ServerConfig->st_LoadBalance.pStl_ListBucket->push_back(st_Bucket);
352351
}

0 commit comments

Comments
 (0)