summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-08 18:45:21 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-08 18:45:21 -0700
commitccc73b920ecab667aa6ddb7d47e17c12f4b0ab8c (patch)
treeec37be43aeb757b2d624138bc43b74e9d2ee0232 /node/Peer.cpp
parentd9e9b60a98a9acc1bc2b078f95541063bdef5db4 (diff)
downloadinfinitytier-ccc73b920ecab667aa6ddb7d47e17c12f4b0ab8c.tar.gz
infinitytier-ccc73b920ecab667aa6ddb7d47e17c12f4b0ab8c.zip
Node peer list function for CAPI, and some Peer cleanup.
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 3270a231..8639da8f 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -87,13 +87,13 @@ void Peer::received(
if ((verb == Packet::VERB_OK)&&(inReVerb == Packet::VERB_HELLO)) {
// Learn paths if they've been confirmed via a HELLO
Path *slot = (Path *)0;
- if (np < ZT_PEER_MAX_PATHS) {
+ if (np < ZT1_MAX_PEER_NETWORK_PATHS) {
// Add new path
slot = &(_paths[np++]);
} else {
// Replace oldest non-fixed path
uint64_t slotLRmin = 0xffffffffffffffffULL;
- for(unsigned int p=0;p<ZT_PEER_MAX_PATHS;++p) {
+ for(unsigned int p=0;p<ZT1_MAX_PEER_NETWORK_PATHS;++p) {
if ((!_paths[p].fixed())&&(_paths[p].lastReceived() <= slotLRmin)) {
slotLRmin = _paths[p].lastReceived();
slot = &(_paths[p]);
@@ -218,13 +218,13 @@ void Peer::addPath(const Path &newp)
}
Path *slot = (Path *)0;
- if (np < ZT_PEER_MAX_PATHS) {
+ if (np < ZT1_MAX_PEER_NETWORK_PATHS) {
// Add new path
slot = &(_paths[np++]);
} else {
// Replace oldest non-fixed path
uint64_t slotLRmin = 0xffffffffffffffffULL;
- for(unsigned int p=0;p<ZT_PEER_MAX_PATHS;++p) {
+ for(unsigned int p=0;p<ZT1_MAX_PEER_NETWORK_PATHS;++p) {
if ((!_paths[p].fixed())&&(_paths[p].lastReceived() <= slotLRmin)) {
slotLRmin = _paths[p].lastReceived();
slot = &(_paths[p]);