Skip to content

Commit 0ec3de6

Browse files
committed
added:sqlfile field
delete:p2p mode field
1 parent a27f04e commit 0ec3de6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

XEngine_Source/StorageModule_Config/Config_Define.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ typedef struct tag_XEngine_ServerConfig
5959
TCHAR tszDBName[128];
6060
int nSQLPort;
6161
BOOL bEnable;
62+
TCHAR tszSQLFile[MAX_PATH];
6263
}st_XSql;
6364
struct
6465
{
@@ -90,7 +91,6 @@ typedef struct tag_XEngine_ServerConfig
9091
}st_XLimit;
9192
struct
9293
{
93-
int nMode;
9494
int nTime;
9595
int nSDPort;
9696
int nRVPort;

XEngine_Source/StorageModule_Config/Config_Json/Config_Json.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVERCONFIG
128128
pSt_ServerConfig->st_XLog.nMaxCount = st_JsonXLog["MaxCount"].asInt();
129129
pSt_ServerConfig->st_XLog.nLogLeave = st_JsonXLog["LogLeave"].asInt();
130130

131-
if (st_JsonRoot["XSql"].empty() || (5 != st_JsonRoot["XSql"].size()))
131+
if (st_JsonRoot["XSql"].empty() || (6 != st_JsonRoot["XSql"].size()))
132132
{
133133
Config_IsErrorOccur = TRUE;
134134
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_XSQL;
@@ -141,6 +141,7 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVERCONFIG
141141
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLAddr, st_JsonXSql["SQLAddr"].asCString());
142142
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLUser, st_JsonXSql["SQLUser"].asCString());
143143
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLPass, st_JsonXSql["SQLPass"].asCString());
144+
_tcscpy(pSt_ServerConfig->st_XSql.tszSQLFile, st_JsonXSql["SQLFile"].asCString());
144145

145146
if (st_JsonRoot["XStorage"].empty() || (3 != st_JsonRoot["XStorage"].size()))
146147
{
@@ -183,14 +184,13 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVERCONFIG
183184
pSt_ServerConfig->st_XLimit.nMaxDNLoader = st_JsonXLimit["nMaxDNLoad"].asInt64();
184185
pSt_ServerConfig->st_XLimit.nMaxUPLoader = st_JsonXLimit["nMaxUPLoad"].asInt64();
185186

186-
if (st_JsonRoot["XP2xp"].empty() || (5 != st_JsonRoot["XP2xp"].size()))
187+
if (st_JsonRoot["XP2xp"].empty() || (4 != st_JsonRoot["XP2xp"].size()))
187188
{
188189
Config_IsErrorOccur = TRUE;
189190
Config_dwErrorCode = ERROR_XENGINE_BLOGIC_CONFIG_JSON_P2XP;
190191
return FALSE;
191192
}
192193
Json::Value st_JsonP2xp = st_JsonRoot["XP2xp"];
193-
pSt_ServerConfig->st_P2xp.nMode = st_JsonP2xp["nMode"].asInt();
194194
pSt_ServerConfig->st_P2xp.nTime = st_JsonP2xp["nTime"].asInt();
195195
pSt_ServerConfig->st_P2xp.nRVPort = st_JsonP2xp["nRVPort"].asInt();
196196
pSt_ServerConfig->st_P2xp.nSDPort = st_JsonP2xp["nSDPort"].asInt();

XEngine_Source/StorageModule_Config/StorageModule_Config.vcxproj.filters

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup>
4-
<Filter Include="源文件">
5-
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6-
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7-
</Filter>
84
<Filter Include="头文件">
95
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
106
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
@@ -16,6 +12,10 @@
1612
<Filter Include="头文件\Config_Json">
1713
<UniqueIdentifier>{1814f2bd-2fcf-428a-a64b-a2ede09edc8a}</UniqueIdentifier>
1814
</Filter>
15+
<Filter Include="源文件">
16+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
17+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
18+
</Filter>
1919
<Filter Include="源文件\Config_Json">
2020
<UniqueIdentifier>{ea496d02-b274-41ed-910c-bf15fafb523e}</UniqueIdentifier>
2121
</Filter>

0 commit comments

Comments
 (0)