Skip to content

Commit e613753

Browse files
committed
modify:http packet can be set null message
1 parent 3b9fdc6 commit e613753

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

XEngine_Source/MQCore_ProtocolModule/ProtocolModule_Packet/ProtocolModule_Packet.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,14 @@ bool CProtocolModule_Packet::ProtocolModule_Packet_Http(XCHAR* ptszMsgBuffer, in
374374
Json::Value st_JsonRoot;
375375
Json::StreamWriterBuilder st_JsonBuilder;
376376

377-
st_JsonRoot["msg"] = lpszMsgBuffer;
377+
if (NULL == lpszMsgBuffer)
378+
{
379+
st_JsonRoot["msg"] = "success";
380+
}
381+
else
382+
{
383+
st_JsonRoot["msg"] = lpszMsgBuffer;
384+
}
378385
st_JsonRoot["code"] = nCode;
379386

380387
st_JsonBuilder["emitUTF8"] = true;

0 commit comments

Comments
 (0)