Skip to content

Commit 4e6d2e1

Browse files
committed
fixed:getting messages will process messages that are not sent to self
1 parent cf50204 commit 4e6d2e1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

XEngine_Source/XEngine_MQServiceApp/MQService_TCPTask.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,15 @@ bool MessageQueue_TCP_Handle(XENGINE_PROTOCOLHDR* pSt_ProtocolHdr, LPCXSTR lpszC
588588
continue;
589589
}
590590
}
591+
//判断是否指定了用户
592+
if (_tcsxlen(st_MessageQueue.tszUserBelong) > 0)
593+
{
594+
if (0 != _tcsxnicmp(st_MessageQueue.tszUserBelong, tszUserName, _tcsxlen(tszUserName)))
595+
{
596+
st_UserKey.nKeySerial++;
597+
continue;
598+
}
599+
}
591600
//是不是自己发布的
592601
XENGINE_PROTOCOL_MSGATTR st_MSGAttr;
593602
memcpy(&st_MSGAttr, &st_MessageQueue.nMsgAttr, sizeof(XENGINE_PROTOCOL_MSGATTR));

0 commit comments

Comments
 (0)