Remove more legacy code -- just doing the supernode redist for old multicast is now good enough given the small number of legacy nodes left.

This commit is contained in:
Adam Ierymenko 2014-11-26 13:39:57 -08:00
parent 4303376ba6
commit 04e4c5263e

View File

@ -373,19 +373,14 @@ void Multicaster::_add(uint64_t now,uint64_t nwid,const MulticastGroup &mg,Multi
//TRACE("..MC %s joined multicast group %.16llx/%s via %s",member.toString().c_str(),nwid,mg.toString().c_str(),((learnedFrom) ? learnedFrom.toString().c_str() : "(direct)"));
// Try to send to any outgoing multicasts that are waiting for more recipients
// TODO / LEGACY: don't send new multicast frame to old peers (if we know their version)
SharedPtr<Peer> p(RR->topology->getPeer(member));
if ((!p)||(!p->remoteVersionKnown())||(p->remoteVersionMajor() >= 1)) {
for(std::list<OutboundMulticast>::iterator tx(gs.txQueue.begin());tx!=gs.txQueue.end();) {
if (tx->atLimit()) {
for(std::list<OutboundMulticast>::iterator tx(gs.txQueue.begin());tx!=gs.txQueue.end();) {
if (tx->atLimit()) {
gs.txQueue.erase(tx++);
} else {
tx->sendIfNew(RR,member);
if (tx->atLimit())
gs.txQueue.erase(tx++);
} else {
tx->sendIfNew(RR,member);
if (tx->atLimit())
gs.txQueue.erase(tx++);
else ++tx;
}
else ++tx;
}
}
}