Skip to content

Commit a35c1a5

Browse files
committed
fixed:p2p has a error with get pakcet
1 parent 57d2358 commit a35c1a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

XEngine_Source/XEngine_StorageApp/StorageApp_P2XPNet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ XHTHREAD CALLBACK XEngine_P2XP_TCPThread(LPVOID lParam)
1010
//等待指定线程事件触发
1111
if (HelpComponents_Datas_WaitEventEx(xhP2XPPacket, nThreadPos))
1212
{
13-
int nMsgLen = 4096;
1413
int nListCount = 0;
1514
TCHAR tszMsgBuffer[4096];
1615
XENGINE_PROTOCOLHDR st_ProtocolHdr;
1716
HELPCOMPONENT_PACKET_CLIENT** ppSst_ListAddr;
1817

19-
memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR));
20-
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
21-
2218
HelpComponents_Datas_GetPoolEx(xhP2XPPacket, nThreadPos, &ppSst_ListAddr, &nListCount);
2319
for (int i = 0; i < nListCount; i++)
2420
{
21+
int nMsgLen = 4096;
22+
memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR));
23+
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
24+
2525
for (int j = 0; j < ppSst_ListAddr[i]->nPktCount; j++)
2626
{
2727
if (!HelpComponents_Datas_GetEx(xhP2XPPacket, ppSst_ListAddr[i]->tszClientAddr, tszMsgBuffer, &nMsgLen, &st_ProtocolHdr))

0 commit comments

Comments
 (0)