From 1a106bca3be9dd1cee8e890e4ec21916167168bc Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 12 Nov 2020 20:53:14 -0500 Subject: [PATCH] Revert "Build fix, and move multicast pushCredentialsIfNeeded." This reverts commit cc42d6f4e0b692eec5a8fd4d886958e59238e0f8. --- node/Multicaster.cpp | 9 --------- node/Switch.cpp | 2 ++ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index b6ae652de..8556acc67 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -247,7 +247,6 @@ void Multicaster::send( for(unsigned int i=0;iidentity.address())&&(activeBridges[i] != origin)) { - network->pushCredentialsIfNeeded(tPtr,activeBridges[i],RR->node->now()); out.sendOnly(RR,tPtr,activeBridges[i]); // optimization: don't use dedup log if it's a one-pass send if (++count >= limit) break; @@ -258,7 +257,6 @@ void Multicaster::send( while ((count < limit)&&(idx < gs.members.size())) { const Address ma(gs.members[indexes[idx++]].address); if ((std::find(activeBridges,activeBridges + activeBridgeCount,ma) == (activeBridges + activeBridgeCount))&&(ma != origin)) { - network->pushCredentialsIfNeeded(tPtr,ma,RR->node->now()); out.sendOnly(RR,tPtr,ma); // optimization: don't use dedup log if it's a one-pass send ++count; } @@ -349,7 +347,6 @@ void Multicaster::send( for(unsigned int i=0;iidentity.address()) { - network->pushCredentialsIfNeeded(tPtr,activeBridges[i],RR->node->now()); out.sendAndLog(RR,tPtr,activeBridges[i]); if (++count >= limit) break; @@ -360,7 +357,6 @@ void Multicaster::send( while ((count < limit)&&(idx < gs.members.size())) { Address ma(gs.members[indexes[idx++]].address); if (std::find(activeBridges,activeBridges + activeBridgeCount,ma) == (activeBridges + activeBridgeCount)) { - network->pushCredentialsIfNeeded(tPtr,ma,RR->node->now()); out.sendAndLog(RR,tPtr,ma); ++count; } @@ -418,10 +414,6 @@ void Multicaster::_add(void *tPtr,int64_t now,uint64_t nwid,const MulticastGroup if (member == RR->identity.address()) return; - SharedPtr network(RR->node->network(nwid)); - if (!network) - return; - std::vector::iterator m(std::lower_bound(gs.members.begin(),gs.members.end(),member)); if (m != gs.members.end()) { if (m->address == member) { @@ -437,7 +429,6 @@ void Multicaster::_add(void *tPtr,int64_t now,uint64_t nwid,const MulticastGroup if (tx->atLimit()) gs.txQueue.erase(tx++); else { - network->pushCredentialsIfNeeded(tPtr,member,RR->node->now()); tx->sendIfNew(RR,tPtr,member); if (tx->atLimit()) gs.txQueue.erase(tx++); diff --git a/node/Switch.cpp b/node/Switch.cpp index b2040455b..7d81aca2c 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -481,6 +481,8 @@ void Switch::onLocalEthernet(void *tPtr,const SharedPtr &network,const return; } + network->pushCredentialsIfNeeded(tPtr,toZT,RR->node->now()); + RR->mc->send( tPtr, RR->node->now(),