diff options
Diffstat (limited to 'node/Network.hpp')
-rw-r--r-- | node/Network.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index ada491a6..fa76152b 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -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; } /** |