Fixed a bug.

This commit is contained in:
Martin Preuss
2023-02-21 06:19:08 +01:00
parent 7dbd50eeba
commit f727d3bb2f

View File

@@ -232,19 +232,21 @@ void _distributeMsg(AQH_MSG_ENDPOINT_MGR *emgr, AQH_MSG_ENDPOINT *srcEp, const A
ep=AQH_MsgEndpoint_List_First(emgr->endpointList);
while(ep) {
uint32_t acceptedGroupIds;
uint32_t acceptedMsgGroups;
if (ep!=srcEp) {
uint32_t acceptedGroupIds;
uint32_t acceptedMsgGroups;
acceptedGroupIds=AQH_MsgEndpoint_GetAcceptedMsgGroups(ep);
acceptedMsgGroups=AQH_MsgEndpoint_GetAcceptedMsgGroups(ep);
acceptedGroupIds=AQH_MsgEndpoint_GetAcceptedMsgGroups(ep);
acceptedMsgGroups=AQH_MsgEndpoint_GetAcceptedMsgGroups(ep);
if (
!(AQH_MsgEndpoint_GetFlags(ep) & AQH_MSG_ENDPOINT_FLAGS_NOMESSAGES) &&
(acceptedMsgGroups & msgGroup) &&
(acceptedGroupIds & srcGroupId)
) {
/* endpoint accepts this message */
AQH_MsgEndpoint_AddSendMessage(ep, AQH_Msg_dup(msg));
if (
!(AQH_MsgEndpoint_GetFlags(ep) & AQH_MSG_ENDPOINT_FLAGS_NOMESSAGES) &&
(acceptedMsgGroups & msgGroup) &&
(acceptedGroupIds & srcGroupId)
) {
/* endpoint accepts this message */
AQH_MsgEndpoint_AddSendMessage(ep, AQH_Msg_dup(msg));
}
}
ep=AQH_MsgEndpoint_List_Next(ep);
}