Skip to content

Commit dab25d3

Browse files
committed
added:auto speed and download try number for configure
1 parent cb599f6 commit dab25d3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

XEngine_Source/StorageModule_Config/Config_Define.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ typedef struct tag_XEngine_ServerConfig
8484
}st_XProxy;
8585
struct
8686
{
87+
BOOL bAutoSpeed;
88+
int nDLTry;
8789
__int64x nMaxUPLoader;
8890
__int64x nMaxDNLoader;
8991
}st_XLimit;

XEngine_Source/StorageModule_Config/Config_Json/Config_Json.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,15 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
155155
_tcscpy(pSt_ServerConfig->st_XProxy.st_XProxyPass.tszDLPass, st_JsonXProxyPass["tszDLPass"].asCString());
156156
_tcscpy(pSt_ServerConfig->st_XProxy.st_XProxyPass.tszUPPass, st_JsonXProxyPass["tszUPPass"].asCString());
157157

158-
if (st_JsonRoot["XLimit"].empty() || (2 != st_JsonRoot["XLimit"].size()))
158+
if (st_JsonRoot["XLimit"].empty() || (4 != st_JsonRoot["XLimit"].size()))
159159
{
160160
Config_IsErrorOccur = TRUE;
161161
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_XSTORAGE;
162162
return FALSE;
163163
}
164164
Json::Value st_JsonXLimit = st_JsonRoot["XLimit"];
165+
pSt_ServerConfig->st_XLimit.bAutoSpeed = st_JsonXLimit["bAutoSpeed"].asUInt();
166+
pSt_ServerConfig->st_XLimit.nDLTry = st_JsonXLimit["nDLTry"].asUInt();
165167
pSt_ServerConfig->st_XLimit.nMaxDNLoader = st_JsonXLimit["nMaxDNLoad"].asInt64();
166168
pSt_ServerConfig->st_XLimit.nMaxUPLoader = st_JsonXLimit["nMaxUPLoad"].asInt64();
167169

0 commit comments

Comments
 (0)