Skip to content

Commit c08c6cb

Browse files
committed
update:match xengine v9.x support
1 parent 28b2505 commit c08c6cb

File tree

16 files changed

+64
-58
lines changed

16 files changed

+64
-58
lines changed

XEngine_Source/MQCore_DBModule/DBModule_MQData/DBModule_MQData.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ bool CDBModule_MQData::DBModule_MQData_CreateTable(LPCXSTR lpszQueueName)
579579

580580
#ifdef _MSC_BUILD
581581
int nUTFLen = 0;
582-
BaseLib_OperatorCharset_AnsiToUTF(tszSQLQuery, tszUTFQuery, &nUTFLen);
582+
BaseLib_Charset_AnsiToUTF(tszSQLQuery, tszUTFQuery, &nUTFLen);
583583
if (!DataBase_MySQL_Execute(xhDBSQL, tszUTFQuery))
584584
#else
585585
if (!DataBase_MySQL_Execute(xhDBSQL, tszSQLQuery))
@@ -725,7 +725,7 @@ bool CDBModule_MQData::DBModule_MQData_ShowTable(XCHAR*** pppszTableName, int* p
725725
return false;
726726
}
727727
*pInt_ListCount = (int)nllLine;
728-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppszTableName, (int)nllLine, sizeof(XENGINE_DBMESSAGEQUEUE));
728+
BaseLib_Memory_Malloc((XPPPMEM)pppszTableName, (int)nllLine, sizeof(XENGINE_DBMESSAGEQUEUE));
729729
for (__int64u i = 0; i < nllLine; i++)
730730
{
731731
XCHAR** pptszResult = DataBase_MySQL_GetResult(xhDBSQL, xhTable);

XEngine_Source/MQCore_DBModule/DBModule_MQUser/DBModule_MQUser.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ bool CDBModule_MQUser::DBModule_MQUser_UserList(XENGINE_PROTOCOL_USERINFO*** ppp
330330
return false;
331331
}
332332
*pInt_ListCount = (int)nllLine;
333-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_UserInfo, (int)nllLine, sizeof(XENGINE_PROTOCOL_USERINFO));
333+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_UserInfo, (int)nllLine, sizeof(XENGINE_PROTOCOL_USERINFO));
334334
for (__int64u i = 0; i < nllLine; i++)
335335
{
336336
XCHAR** pptszResult = DataBase_MySQL_GetResult(xhDBSQL, xhTable);
@@ -551,7 +551,7 @@ bool CDBModule_MQUser::DBModule_MQUser_KeyList(LPCXSTR lpszUser, LPCXSTR lpszKey
551551
return false;
552552
}
553553
*pInt_ListCount = (int)nllLine;
554-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_UserKey, (int)nllLine, sizeof(XENGINE_DBUSERKEY));
554+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_UserKey, (int)nllLine, sizeof(XENGINE_DBUSERKEY));
555555
for (__int64u i = 0; i < nllLine; i++)
556556
{
557557
XCHAR** pptszResult = DataBase_MySQL_GetResult(xhDBSQL, xhTable);
@@ -782,7 +782,7 @@ bool CDBModule_MQUser::DBModule_MQUser_TimeQuery(XENGINE_DBTIMERELEASE*** pppSt_
782782
return false;
783783
}
784784
*pInt_ListCount = (int)nllLine;
785-
BaseLib_OperatorMemory_Malloc((XPPPMEM)pppSt_DBInfo, *pInt_ListCount, sizeof(XENGINE_DBTIMERELEASE));
785+
BaseLib_Memory_Malloc((XPPPMEM)pppSt_DBInfo, *pInt_ListCount, sizeof(XENGINE_DBTIMERELEASE));
786786
for (__int64u i = 0; i < nllLine; i++)
787787
{
788788
XCHAR** pptszResult = DataBase_MySQL_GetResult(xhDBSQL, xhTable);
@@ -1141,7 +1141,7 @@ XHTHREAD CALLBACK CDBModule_MQUser::DBModule_MQUser_TimeThread(XPVOID lParam)
11411141
{
11421142
pClass_This->lpCall_TimePublish(ppSt_DBInfo[i], pClass_This->m_lParam);
11431143
}
1144-
BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_DBInfo, nListCount);
1144+
BaseLib_Memory_Free((XPPPMEM)&ppSt_DBInfo, nListCount);
11451145
std::this_thread::sleep_for(std::chrono::seconds(1));
11461146
}
11471147
return 0;

XEngine_Source/MQCore_ProtocolModule/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LIBFLAG =
77
RELEASE = 0
88
LOADHDR = -I ./ -I ../XEngine_Depend/XEngine_Module/jsoncpp
99
LOADSO = -L ../XEngine_Depend/XEngine_Module/jsoncpp
10-
LIB = -ljsoncpp -lXEngine_BaseLib -lXEngine_OPenSsl -lRfcComponents_MQTTProtocol
10+
LIB = -ljsoncpp -lXEngine_BaseLib -lXEngine_Cryption -lRfcComponents_MQTTProtocol
1111
LIBEX =
1212
OBJECTS = ProtocolModule_Packet.o ProtocolModule_Parse.o pch.o
1313

XEngine_Source/MQCore_ProtocolModule/ProtocolModule_Packet/ProtocolModule_Packet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ bool CProtocolModule_Packet::ProtocolModule_Packet_WSCommon(XENGINE_PROTOCOLHDR*
829829
}
830830
memset(ptszBaseBuffer, '\0', XENGINE_MEMORY_SIZE_MAX);
831831

832-
OPenSsl_Codec_Base64(lpszMsgBuffer, ptszBaseBuffer, &nBLen, true);
832+
Cryption_Codec_Base64(lpszMsgBuffer, ptszBaseBuffer, &nBLen, true);
833833
st_JsonPayload["nPayLen"] = nBLen;
834834
st_JsonPayload["tszPayData"] = ptszBaseBuffer;
835835
}
@@ -861,7 +861,7 @@ bool CProtocolModule_Packet::ProtocolModule_Packet_MQTTCommon(XENGINE_PROTOCOLHD
861861
XCHAR tszRVBuffer[1024];
862862
MQTTPROTOCOL_HDRPROPERTY** ppSt_HDRProperty;
863863

864-
BaseLib_OperatorMemory_Malloc((XPPPMEM)&ppSt_HDRProperty, nListCount, sizeof(MQTTPROTOCOL_HDRPROPERTY));
864+
BaseLib_Memory_Malloc((XPPPMEM)&ppSt_HDRProperty, nListCount, sizeof(MQTTPROTOCOL_HDRPROPERTY));
865865

866866
ppSt_HDRProperty[0]->nProLen = 4;
867867
ppSt_HDRProperty[0]->st_unValue.nValue = 1024000;
@@ -889,7 +889,7 @@ bool CProtocolModule_Packet::ProtocolModule_Packet_MQTTCommon(XENGINE_PROTOCOLHD
889889

890890
MQTTProtocol_Packet_REPConnect(tszRVBuffer, &nRVLen, 0, XENGINE_RFCCOMPONENTS_MQTT_PROTOCOL_REASON_SUCCESS, &ppSt_HDRProperty, nListCount);
891891
MQTTProtocol_Packet_Header(ptszMsgBuffer, pInt_MsgLen, XENGINE_RFCCOMPONENTS_MQTT_PROTOCOL_TYPE_CONNACK, tszRVBuffer, nRVLen);
892-
BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_HDRProperty, nListCount);
892+
BaseLib_Memory_Free((XPPPMEM)&ppSt_HDRProperty, nListCount);
893893
}
894894
else
895895
{

XEngine_Source/MQCore_ProtocolModule/ProtocolModule_Parse/ProtocolModule_Parse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ bool CProtocolModule_Parse::ProtocolModule_Parse_Websocket(LPCXSTR lpszMsgBuffer
209209
if (ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_BIN == pSt_ProtocolHdr->byVersion)
210210
{
211211
int nBLen = st_JsonPayLoad["nPayLen"].asInt();
212-
OPenSsl_Codec_Base64(st_JsonPayLoad["tszPayData"].asCString(), ptszMsgBuffer + nPos, &nBLen, false);
212+
Cryption_Codec_Base64(st_JsonPayLoad["tszPayData"].asCString(), ptszMsgBuffer + nPos, &nBLen, false);
213213
*pInt_MsgLen += nBLen;
214214
}
215215
else

XEngine_Source/MQCore_ProtocolModule/pch.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#include <XEngine_Include/XEngine_ProtocolHdr.h>
2222
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
2323
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
24-
#include <XEngine_Include/XEngine_Core/OPenSsl_Define.h>
25-
#include <XEngine_Include/XEngine_Core/OPenSsl_Error.h>
24+
#include <XEngine_Include/XEngine_Core/Cryption_Define.h>
25+
#include <XEngine_Include/XEngine_Core/Cryption_Error.h>
2626
#include <XEngine_Include/XEngine_Core/ManagePool_Define.h>
2727
#include <XEngine_Include/XEngine_HelpComponents/DataBase_Define.h>
2828
#include <XEngine_Include/XEngine_RfcComponents/MQTTProtocol_Define.h>
@@ -48,7 +48,7 @@ extern XLONG Protocol_dwErrorCode;
4848

4949
#ifdef _MSC_BUILD
5050
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
51-
#pragma comment(lib,"XEngine_Core/XEngine_OPenSsl")
51+
#pragma comment(lib,"XEngine_Core/XEngine_Cryption")
5252
#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_MQTTProtocol.lib")
5353
#ifdef _DEBUG
5454
#ifdef _WIN64

XEngine_Source/MQCore_SessionModule/SessionModule_Client/SessionModule_Client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ bool CSessionModule_Client::SessionModule_Client_GetListAddr(XCHAR*** ppptszClie
432432
Session_IsErrorOccur = false;
433433

434434
*pInt_ListCount = stl_MapSession.size();
435-
BaseLib_OperatorMemory_Malloc((XPPPMEM)ppptszClientList, stl_MapSession.size(), 128);
435+
BaseLib_Memory_Malloc((XPPPMEM)ppptszClientList, stl_MapSession.size(), 128);
436436

437437
st_Locker.lock_shared();
438438
unordered_map<tstring, XENGINE_SESSIONINFO>::iterator stl_MapIterator = stl_MapSession.begin();

XEngine_Source/VSCopy_Debug.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_BaseSafe.dll" "./"
33
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Algorithm.dll" "./"
44
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Core.dll" "./"
55
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_ManagePool.dll" "./"
6-
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_OPenSsl.dll" "./"
6+
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Cryption.dll" "./"
77

88
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemApi.dll" "./"
99
copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_APIHelp.dll" "./"
1010

11+
copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_APIHelp.dll" "./"
12+
1113
copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_Packets.dll" "./"
1214
copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_XLog.dll" "./"
1315
copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_DataBase.dll" "./"

XEngine_Source/VSCopy_x64.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./"
33
copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
44
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Core.dll" "./"
55
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_ManagePool.dll" "./"
6-
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_OPenSsl.dll" "./"
6+
copy /y "%XEngine_Lib64%\XEngine_Core\XEngine_Cryption.dll" "./"
77

88
copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
99
copy /y "%XEngine_Lib64%\XEngine_Client\XClient_APIHelp.dll" "./"
1010

11+
copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
12+
1113
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"
1214
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
1315
copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./"

XEngine_Source/VSCopy_x86.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./"
33
copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_Algorithm.dll" "./"
44
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Core.dll" "./"
55
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_ManagePool.dll" "./"
6-
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_OPenSsl.dll" "./"
6+
copy /y "%XEngine_Lib32%\XEngine_Core\XEngine_Cryption.dll" "./"
77

88
copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./"
99
copy /y "%XEngine_Lib32%\XEngine_Client\XClient_APIHelp.dll" "./"
1010

11+
copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./"
12+
1113
copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_Packets.dll" "./"
1214
copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./"
1315
copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./"

0 commit comments

Comments
 (0)