Skip to content

Commit 25f9961

Browse files
committed
update:match xengine v8.10
1 parent 9e09c89 commit 25f9961

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+641
-641
lines changed

XEngine_Source/MQCore_ConfigModule/Config_Define.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef struct tag_XEngine_ServerConfig
1717
{
1818
TCHAR tszIPAddr[128];
1919
TCHAR tszTopic[128];
20-
BOOL bDeamon;
20+
bool bDeamon;
2121
int nTCPPort;
2222
int nHttpPort;
2323
int nWSPort;
@@ -69,4 +69,4 @@ extern "C" DWORD Config_GetLastError(int *pInt_ErrorCode = NULL);
6969
/************************************************************************/
7070
/* 文件配置读取 */
7171
/************************************************************************/
72-
extern "C" BOOL Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG *pSt_ServerConfig);
72+
extern "C" bool Config_Json_File(LPCXSTR lpszConfigFile,XENGINE_SERVERCONFIG *pSt_ServerConfig);

XEngine_Source/MQCore_ConfigModule/Config_Json/Config_Json.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ CConfig_Json::~CConfig_Json()
2222
//////////////////////////////////////////////////////////////////////////
2323
// 公用函数
2424
//////////////////////////////////////////////////////////////////////////
25-
BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG *pSt_ServerConfig)
25+
bool CConfig_Json::Config_Json_File(LPCXSTR lpszConfigFile,XENGINE_SERVERCONFIG *pSt_ServerConfig)
2626
{
27-
Config_IsErrorOccur = FALSE;
27+
Config_IsErrorOccur = false;
2828

2929
if ((NULL == lpszConfigFile) || (NULL == pSt_ServerConfig))
3030
{
31-
Config_IsErrorOccur = TRUE;
31+
Config_IsErrorOccur = true;
3232
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_PARAMENT;
33-
return FALSE;
33+
return false;
3434
}
3535
JSONCPP_STRING st_JsonError;
3636
Json::Value st_JsonRoot;
@@ -39,9 +39,9 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
3939
FILE* pSt_File = _tfopen(lpszConfigFile, _T("rb"));
4040
if (NULL == pSt_File)
4141
{
42-
Config_IsErrorOccur = TRUE;
42+
Config_IsErrorOccur = true;
4343
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_PARAMENT;
44-
return FALSE;
44+
return false;
4545
}
4646
int nCount = 0;
4747
TCHAR tszMsgBuffer[4096];
@@ -59,9 +59,9 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
5959
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_JsonBuilder.newCharReader());
6060
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError))
6161
{
62-
Config_IsErrorOccur = TRUE;
62+
Config_IsErrorOccur = true;
6363
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_PARSE;
64-
return FALSE;
64+
return false;
6565
}
6666
_tcscpy(pSt_ServerConfig->tszIPAddr,st_JsonRoot["tszIPAddr"].asCString());
6767
_tcscpy(pSt_ServerConfig->tszTopic, st_JsonRoot["tszTopic"].asCString());
@@ -72,9 +72,9 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
7272

7373
if (st_JsonRoot["XMax"].empty() || (6 != st_JsonRoot["XMax"].size()))
7474
{
75-
Config_IsErrorOccur = TRUE;
75+
Config_IsErrorOccur = true;
7676
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XMAX;
77-
return FALSE;
77+
return false;
7878
}
7979
Json::Value st_JsonXMax = st_JsonRoot["XMax"];
8080
pSt_ServerConfig->st_XMax.nMaxClient = st_JsonXMax["nMaxClient"].asInt();
@@ -86,19 +86,19 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
8686

8787
if (st_JsonRoot["XTime"].empty() || (2 != st_JsonRoot["XTime"].size()))
8888
{
89-
Config_IsErrorOccur = TRUE;
89+
Config_IsErrorOccur = true;
9090
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XTIME;
91-
return FALSE;
91+
return false;
9292
}
9393
Json::Value st_JsonXTime = st_JsonRoot["XTime"];
9494
pSt_ServerConfig->st_XTime.nDBMonth = st_JsonXTime["nDBMonth"].asInt();
9595
pSt_ServerConfig->st_XTime.nSessionTime = st_JsonXTime["nSessionTime"].asInt();
9696

9797
if (st_JsonRoot["XLog"].empty() || (3 != st_JsonRoot["XLog"].size()))
9898
{
99-
Config_IsErrorOccur = TRUE;
99+
Config_IsErrorOccur = true;
100100
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XLOG;
101-
return FALSE;
101+
return false;
102102
}
103103
Json::Value st_JsonXLog = st_JsonRoot["XLog"];
104104
pSt_ServerConfig->st_XLog.nMaxSize = st_JsonXLog["MaxSize"].asInt();
@@ -107,9 +107,9 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
107107

108108
if (st_JsonRoot["XSql"].empty() || (4 != st_JsonRoot["XSql"].size()))
109109
{
110-
Config_IsErrorOccur = TRUE;
110+
Config_IsErrorOccur = true;
111111
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XSQL;
112-
return FALSE;
112+
return false;
113113
}
114114
Json::Value st_JsonXSql = st_JsonRoot["XSql"];
115115
pSt_ServerConfig->st_XSql.nSQLPort = st_JsonXSql["SQLPort"].asInt();
@@ -119,9 +119,9 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
119119

120120
if (st_JsonRoot["XPass"].empty() || (5 != st_JsonRoot["XPass"].size()))
121121
{
122-
Config_IsErrorOccur = TRUE;
122+
Config_IsErrorOccur = true;
123123
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XPASS;
124-
return FALSE;
124+
return false;
125125
}
126126
Json::Value st_JsonXPass = st_JsonRoot["XPass"];
127127
pSt_ServerConfig->st_XPass.nTimeout = st_JsonXPass["nTimeout"].asInt();
@@ -132,9 +132,9 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
132132

133133
if (st_JsonRoot["XVer"].empty())
134134
{
135-
Config_IsErrorOccur = TRUE;
135+
Config_IsErrorOccur = true;
136136
Config_dwErrorCode = ERROR_MQ_MODULE_CONFIG_JSON_XVER;
137-
return FALSE;
137+
return false;
138138
}
139139
Json::Value st_JsonXVer = st_JsonRoot["XVer"];
140140
pSt_ServerConfig->st_XVer.pStl_ListStorage = new list<tstring>;
@@ -143,5 +143,5 @@ BOOL CConfig_Json::Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG
143143
{
144144
pSt_ServerConfig->st_XVer.pStl_ListStorage->push_back(st_JsonXVer[i].asCString());
145145
}
146-
return TRUE;
146+
return true;
147147
}

XEngine_Source/MQCore_ConfigModule/Config_Json/Config_Json.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ class CConfig_Json
1717
CConfig_Json();
1818
~CConfig_Json();
1919
public:
20-
BOOL Config_Json_File(LPCTSTR lpszConfigFile,XENGINE_SERVERCONFIG *pSt_ServerConfig);
20+
bool Config_Json_File(LPCXSTR lpszConfigFile,XENGINE_SERVERCONFIG *pSt_ServerConfig);
2121
};
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// dllmain.cpp : 定义 DLL 应用程序的入口点。
22
#include "pch.h"
33

4-
BOOL APIENTRY DllMain( HMODULE hModule,
4+
bool APIENTRY DllMain( HMODULE hModule,
55
DWORD ul_reason_for_call,
6-
LPVOID lpReserved
6+
XPVOID lpReserved
77
)
88
{
99
switch (ul_reason_for_call)
@@ -14,6 +14,6 @@ BOOL APIENTRY DllMain( HMODULE hModule,
1414
case DLL_PROCESS_DETACH:
1515
break;
1616
}
17-
return TRUE;
17+
return true;
1818
}
1919

XEngine_Source/MQCore_ConfigModule/pch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Purpose: 导出函数实现
1212
// History:
1313
*********************************************************************/
14-
BOOL Config_IsErrorOccur = FALSE;
14+
bool Config_IsErrorOccur = false;
1515
DWORD Config_dwErrorCode = 0;
1616
//////////////////////////////////////////////////////////////////////
1717
CConfig_Json m_ConfigJson;
@@ -29,7 +29,7 @@ extern "C" DWORD Config_GetLastError(int* pInt_ErrorCode)
2929
/************************************************************************/
3030
/* 配置文件读取 */
3131
/************************************************************************/
32-
extern "C" BOOL Config_Json_File(LPCTSTR lpszConfigFile, XENGINE_SERVERCONFIG * pSt_ServerConfig)
32+
extern "C" bool Config_Json_File(LPCXSTR lpszConfigFile, XENGINE_SERVERCONFIG * pSt_ServerConfig)
3333
{
3434
return m_ConfigJson.Config_Json_File(lpszConfigFile, pSt_ServerConfig);
3535
}

XEngine_Source/MQCore_ConfigModule/pch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef std::string tstring;
4242
// Purpose: 公用头文件
4343
// History:
4444
*********************************************************************/
45-
extern BOOL Config_IsErrorOccur;
45+
extern bool Config_IsErrorOccur;
4646
extern DWORD Config_dwErrorCode;
4747

4848
#ifdef _MSC_BUILD

0 commit comments

Comments
 (0)