Check for subscribed multicast groups should be able to check groups bridged behind me.

This commit is contained in:
Adam Ierymenko 2015-04-06 19:34:36 -07:00
parent 4e691c8e22
commit 758bf949db
2 changed files with 7 additions and 3 deletions

View file

@ -116,10 +116,14 @@ public:
* @param mg Multicast group
* @return True if this network endpoint / peer is a member
*/
bool subscribedToMulticastGroup(const MulticastGroup &mg) const
bool subscribedToMulticastGroup(const MulticastGroup &mg,bool includeBridgedGroups) const
{
Mutex::Lock _l(_lock);
return (std::find(_myMulticastGroups.begin(),_myMulticastGroups.end(),mg) != _myMulticastGroups.end());
if (std::find(_myMulticastGroups.begin(),_myMulticastGroups.end(),mg) != _myMulticastGroups.end())
return true;
else if (includeBridgedGroups)
return (_multicastGroupsBehindMe.find(mg) != _multicastGroupsBehindMe.end());
else return false;
}
/**