diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-14 14:17:55 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-14 14:17:55 -0700 |
commit | 59389b3dcefa00541ec923ab091d400b941d6c47 (patch) | |
tree | 47488ebeb21338670e8bf24b75e47a0d587f906b /node | |
parent | 619e1137480de4682bb46eabaee3ce750c5be3e8 (diff) | |
download | infinitytier-59389b3dcefa00541ec923ab091d400b941d6c47.tar.gz infinitytier-59389b3dcefa00541ec923ab091d400b941d6c47.zip |
Untested cluster code, not enabled.
Diffstat (limited to 'node')
-rw-r--r-- | node/Cluster.cpp | 8 | ||||
-rw-r--r-- | node/Topology.cpp | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/node/Cluster.cpp b/node/Cluster.cpp index 98b45265..8a942cb0 100644 --- a/node/Cluster.cpp +++ b/node/Cluster.cpp @@ -195,8 +195,12 @@ void Cluster::handleIncomingStateMessage(const void *msg,unsigned int len) const Address destinationAddress(reinterpret_cast<const char *>(packet) + 8,ZT_ADDRESS_LENGTH); SharedPtr<Peer> destinationPeer(RR->topology->getPeer(destinationAddress)); if (destinationPeer) { - RemotePath *destinationPath = destinationPeer->send(RR,packet,packetLen,RR->node->now()); - if ((destinationPath)&&(numRemotePeerPaths > 0)&&(packetLen >= 18)&&(reinterpret_cast<const unsigned char *>(packet)[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR)) { + if ( + (destinationPeer->send(RR,packet,packetLen,RR->node->now()))&& + (numRemotePeerPaths > 0)&& + (packetLen >= 18)&& + (reinterpret_cast<const unsigned char *>(packet)[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR) + ) { // If remote peer paths were sent with this relayed packet, we do // RENDEZVOUS. It's handled here for cluster-relayed packets since // we don't have both Peer records so this is a different path. diff --git a/node/Topology.cpp b/node/Topology.cpp index 2b973386..a3558558 100644 --- a/node/Topology.cpp +++ b/node/Topology.cpp @@ -183,7 +183,7 @@ Identity Topology::getIdentity(const Address &zta) return _getIdentity(zta); } -void saveIdentity(const Identity &id) +void Topology::saveIdentity(const Identity &id) { if (id) { char p[128]; |