@@ -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