diff --git a/aqhome/msgendpointmanager.c b/aqhome/msgendpointmanager.c index 2fc4b26..c936160 100644 --- a/aqhome/msgendpointmanager.c +++ b/aqhome/msgendpointmanager.c @@ -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); }