Explorar el Código

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

Adam Ierymenko hace 10 años
padre
commit
04e4c5263e
Se han modificado 1 ficheros con 7 adiciones y 12 borrados
  1. 7 12
      node/Multicaster.cpp

+ 7 - 12
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;
 		}
 	}
 }