@@ -293,17 +293,29 @@ BOOL CConfig_Json::Config_Json_LoadBalance(LPCTSTR lpszConfigFile, XENGINE_LBCON
293293 }
294294 pSt_ServerConfig->bDistributed = st_JsonRoot[" bDistributed" ].asInt ();
295295
296- if (st_JsonRoot[" LBConfig " ].empty () || (4 != st_JsonRoot[" LBConfig " ].size ()))
296+ if (st_JsonRoot[" LBDistributed " ].empty () || (4 != st_JsonRoot[" LBDistributed " ].size ()))
297297 {
298298 Config_IsErrorOccur = TRUE ;
299- Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_LBCONFIG ;
299+ Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_LBDISTRIBUTED ;
300300 return FALSE ;
301301 }
302- Json::Value st_JsonLBConfig = st_JsonRoot[" LBConfig" ];
303- pSt_ServerConfig->st_LBConfig .nCenterMode = st_JsonLBConfig[" nCenterMode" ].asInt ();
304- pSt_ServerConfig->st_LBConfig .nUPLoadMode = st_JsonLBConfig[" nUPLoadMode" ].asInt ();
305- pSt_ServerConfig->st_LBConfig .nDownldMode = st_JsonLBConfig[" nDownldMode" ].asInt ();
306- pSt_ServerConfig->st_LBConfig .nStorageMode = st_JsonLBConfig[" nStorageMode" ].asInt ();
302+ Json::Value st_JsonLBDistributed = st_JsonRoot[" LBDistributed" ];
303+ pSt_ServerConfig->st_LBDistributed .nCenterMode = st_JsonLBDistributed[" nCenterMode" ].asInt ();
304+ pSt_ServerConfig->st_LBDistributed .nUPLoadMode = st_JsonLBDistributed[" nUPLoadMode" ].asInt ();
305+ pSt_ServerConfig->st_LBDistributed .nDownldMode = st_JsonLBDistributed[" nDownldMode" ].asInt ();
306+ pSt_ServerConfig->st_LBDistributed .nStorageMode = st_JsonLBDistributed[" nStorageMode" ].asInt ();
307+
308+ if (st_JsonRoot[" LBLocation" ].empty () || (4 != st_JsonRoot[" LBLocation" ].size ()))
309+ {
310+ Config_IsErrorOccur = TRUE ;
311+ Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_LBLOCATION;
312+ return FALSE ;
313+ }
314+ Json::Value st_JsonLBLocation = st_JsonRoot[" LBLocation" ];
315+ pSt_ServerConfig->st_LBLocation .nCenterMode = st_JsonLBLocation[" nCenterMode" ].asInt ();
316+ pSt_ServerConfig->st_LBLocation .nUPLoadMode = st_JsonLBLocation[" nUPLoadMode" ].asInt ();
317+ pSt_ServerConfig->st_LBLocation .nDownldMode = st_JsonLBLocation[" nDownldMode" ].asInt ();
318+ pSt_ServerConfig->st_LBLocation .nStorageMode = st_JsonLBLocation[" nStorageMode" ].asInt ();
307319
308320 if (st_JsonRoot[" LoadBalance" ].empty () || (4 != st_JsonRoot[" LoadBalance" ].size ()))
309321 {
0 commit comments