diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-20 16:24:21 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-20 16:24:21 -0700 |
| commit | eb79d4a2f34b34c49cd2d69efac22d9bc8ac27cb (patch) | |
| tree | b1670c890b60d5ae02fa49f180bb831826edf1d8 /node/Peer.cpp | |
| parent | 57e29857cf79019af03f6a3dfe0bf6fd36e2fab2 (diff) | |
| download | infinitytier-eb79d4a2f34b34c49cd2d69efac22d9bc8ac27cb.tar.gz infinitytier-eb79d4a2f34b34c49cd2d69efac22d9bc8ac27cb.zip | |
Wire up peer announcement in cluster.
Diffstat (limited to 'node/Peer.cpp')
| -rw-r--r-- | node/Peer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 0ba379c6..45e2fedd 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -34,6 +34,7 @@ #include "Network.hpp" #include "AntiRecursion.hpp" #include "SelfAwareness.hpp" +#include "Cluster.hpp" #include <algorithm> @@ -107,7 +108,6 @@ void Peer::received( // Learn paths if they've been confirmed via a HELLO or an ECHO RemotePath *slot = (RemotePath *)0; if (np < ZT_MAX_PEER_NETWORK_PATHS) { - // Add new path slot = &(_paths[np++]); } else { uint64_t slotLRmin = 0xffffffffffffffffULL; @@ -141,6 +141,11 @@ void Peer::received( } } } + +#ifdef ZT_ENABLE_CLUSTER + if ((pathIsConfirmed)&&(RR->cluster)) + RR->cluster->replicateHavePeer(_id); +#endif } if ((now - _lastAnnouncedTo) >= ((ZT_MULTICAST_LIKE_EXPIRE / 2) - 1000)) { |
