diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-11-26 13:39:57 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-11-26 13:39:57 -0800 |
commit | 04e4c5263e17f45d107ed697c2ebea7b98238744 (patch) | |
tree | 117605111fdb696a010d26d1527a244268301973 /node | |
parent | 4303376ba6f1bb597cf9cc9a0a3b85dbb247a13b (diff) | |
download | infinitytier-04e4c5263e17f45d107ed697c2ebea7b98238744.tar.gz infinitytier-04e4c5263e17f45d107ed697c2ebea7b98238744.zip |
Remove more legacy code -- just doing the supernode redist for old multicast is now good enough given the small number of legacy nodes left.
Diffstat (limited to 'node')
-rw-r--r-- | node/Multicaster.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index b9b4d5e0..bb03e976 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -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; } } } |