Skip to content

Commit 0d5061d

Browse files
committed
modify:protocol parse supported header set null
1 parent e3915c2 commit 0d5061d

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

XEngine_Source/MQCore_ProtocolModule/ProtocolModule_Parse/ProtocolModule_Parse.cpp

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,26 +74,31 @@ BOOL CProtocolModule_Parse::ProtocolModule_Parse_Http(LPCTSTR lpszMsgBuffer, int
7474
Protocol_dwErrorCode = ERROR_MQ_MODULE_PROTOCOL_PARSE;
7575
return FALSE;
7676
}
77-
if (!st_JsonRoot["unOperatorType"].isNull())
78-
{
79-
pSt_ProtocolHdr->unOperatorType = st_JsonRoot["unOperatorType"].asInt();
80-
}
81-
if (!st_JsonRoot["unOperatorCode"].isNull())
82-
{
83-
pSt_ProtocolHdr->unOperatorCode = st_JsonRoot["unOperatorCode"].asInt();
84-
}
85-
if (!st_JsonRoot["xhToken"].isNull())
86-
{
87-
pSt_ProtocolHdr->xhToken = st_JsonRoot["xhToken"].asUInt64();
88-
}
89-
if (!st_JsonRoot["wReserve"].isNull())
90-
{
91-
pSt_ProtocolHdr->wReserve = st_JsonRoot["wReserve"].asInt();
92-
}
93-
if (!st_JsonRoot["byVersion"].isNull())
77+
78+
if (NULL != pSt_ProtocolHdr)
9479
{
95-
pSt_ProtocolHdr->byVersion = st_JsonRoot["byVersion"].asInt();
80+
if (!st_JsonRoot["unOperatorType"].isNull())
81+
{
82+
pSt_ProtocolHdr->unOperatorType = st_JsonRoot["unOperatorType"].asInt();
83+
}
84+
if (!st_JsonRoot["unOperatorCode"].isNull())
85+
{
86+
pSt_ProtocolHdr->unOperatorCode = st_JsonRoot["unOperatorCode"].asInt();
87+
}
88+
if (!st_JsonRoot["xhToken"].isNull())
89+
{
90+
pSt_ProtocolHdr->xhToken = st_JsonRoot["xhToken"].asUInt64();
91+
}
92+
if (!st_JsonRoot["wReserve"].isNull())
93+
{
94+
pSt_ProtocolHdr->wReserve = st_JsonRoot["wReserve"].asInt();
95+
}
96+
if (!st_JsonRoot["byVersion"].isNull())
97+
{
98+
pSt_ProtocolHdr->byVersion = st_JsonRoot["byVersion"].asInt();
99+
}
96100
}
101+
97102
*pInt_MsgLen = 0;
98103
XENGINE_PROTOCOL_XMQ st_MQProtocol;
99104
XENGINE_PROTOCOL_USERAUTH st_ProtocolAuth;

0 commit comments

Comments
 (0)