diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-01 11:11:52 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-01 11:11:52 -0700 |
| commit | a3db7d0728c1bc5181b8a70e8c379632125ee376 (patch) | |
| tree | ac18257023caca1e605271319e1f0063058adf41 /node/OutboundMulticast.cpp | |
| parent | 11ff96ba1ddc07c3414590aa31a35e6353176213 (diff) | |
| download | infinitytier-a3db7d0728c1bc5181b8a70e8c379632125ee376.tar.gz infinitytier-a3db7d0728c1bc5181b8a70e8c379632125ee376.zip | |
Refactor: move network COMs out of Network and into Peer in prep for tightening up multicast lookup and other things.
Diffstat (limited to 'node/OutboundMulticast.cpp')
| -rw-r--r-- | node/OutboundMulticast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node/OutboundMulticast.cpp b/node/OutboundMulticast.cpp index 46116c07..c26372cb 100644 --- a/node/OutboundMulticast.cpp +++ b/node/OutboundMulticast.cpp @@ -103,11 +103,11 @@ void OutboundMulticast::init( void OutboundMulticast::sendOnly(const RuntimeEnvironment *RR,const Address &toAddr) { if (_haveCom) { - SharedPtr<Network> network(RR->node->network(_nwid)); - if ((network)&&(network->peerNeedsOurMembershipCertificate(toAddr,RR->node->now()))) { + SharedPtr<Peer> peer(RR->topology->getPeer(toAddr)); + if ( (!peer) || (peer->needsOurNetworkMembershipCertificate(_nwid,RR->node->now(),true)) ) { + //TRACE(">>MC %.16llx -> %s (with COM)",(unsigned long long)this,toAddr.toString().c_str()); _packetWithCom.newInitializationVector(); _packetWithCom.setDestination(toAddr); - //TRACE(">>MC %.16llx -> %s (with COM)",(unsigned long long)this,toAddr.toString().c_str()); RR->sw->send(_packetWithCom,true,_nwid); return; } |
