summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-27 17:33:25 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-03-27 17:33:25 -0700
commit91c9f4cb205169d0ec151293136aa27d113f2090 (patch)
tree526d87cbc5be7f18892872ab668bcac2cafe6c73 /node
parente4896b257fde05a216500804d9bcef3b84b0980e (diff)
downloadinfinitytier-91c9f4cb205169d0ec151293136aa27d113f2090.tar.gz
infinitytier-91c9f4cb205169d0ec151293136aa27d113f2090.zip
Fix TRACE and CLUSTER builds.
Diffstat (limited to 'node')
-rw-r--r--node/Cluster.cpp14
-rw-r--r--node/Node.cpp4
-rw-r--r--node/Peer.cpp4
-rw-r--r--node/Switch.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/node/Cluster.cpp b/node/Cluster.cpp
index 52e03ffe..54206f99 100644
--- a/node/Cluster.cpp
+++ b/node/Cluster.cpp
@@ -346,7 +346,7 @@ void Cluster::handleIncomingStateMessage(const void *msg,unsigned int len)
Mutex::Lock _l(_remotePeers_m);
_RemotePeer &rp = _remotePeers[std::pair<Address,unsigned int>(id.address(),(unsigned int)fromMemberId)];
if (!rp.lastHavePeerReceived) {
- RR->topology->saveIdentity(id);
+ RR->topology->saveIdentity((void *)0,id);
RR->identity.agree(id,rp.key,ZT_PEER_SECRET_KEY_LENGTH);
}
rp.lastHavePeerReceived = RR->node->now();
@@ -459,7 +459,7 @@ void Cluster::handleIncomingStateMessage(const void *msg,unsigned int len)
Mutex::Lock _l2(_members[fromMemberId].lock);
_send(fromMemberId,CLUSTER_MESSAGE_PROXY_SEND,rendezvousForRemote.data(),rendezvousForRemote.size());
}
- RR->sw->send(rendezvousForLocal,true);
+ RR->sw->send((void *)0,rendezvousForLocal,true);
}
}
} break;
@@ -470,7 +470,7 @@ void Cluster::handleIncomingStateMessage(const void *msg,unsigned int len)
const unsigned int len = dmsg.at<uint16_t>(ptr); ptr += 2;
Packet outp(rcpt,RR->identity.address(),verb);
outp.append(dmsg.field(ptr,len),len); ptr += len;
- RR->sw->send(outp,true);
+ RR->sw->send((void *)0,outp,true);
//TRACE("[%u] proxy send %s to %s length %u",(unsigned int)fromMemberId,Packet::verbString(verb),rcpt.toString().c_str(),len);
} break;
@@ -479,7 +479,7 @@ void Cluster::handleIncomingStateMessage(const void *msg,unsigned int len)
if (network) {
// Copy into a Packet just to conform to Network API. Eventually
// will want to refactor.
- network->handleConfigChunk(0,Address(),Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(dmsg),ptr);
+ network->handleConfigChunk((void *)0,0,Address(),Buffer<ZT_PROTO_MAX_PACKET_LENGTH>(dmsg),ptr);
}
} break;
}
@@ -576,7 +576,7 @@ bool Cluster::sendViaCluster(int mostRecentMemberId,const Address &toPeerAddress
for(std::vector<InetAddress>::const_iterator i2(_members[mostRecentMemberId].zeroTierPhysicalEndpoints.begin());i2!=_members[mostRecentMemberId].zeroTierPhysicalEndpoints.end();++i2) {
if (i1->ss_family == i2->ss_family) {
TRACE("sendViaCluster sending %u bytes to %s by way of %u (%s->%s)",len,toPeerAddress.toString().c_str(),(unsigned int)mostRecentMemberId,i1->toString().c_str(),i2->toString().c_str());
- RR->node->putPacket(*i1,*i2,data,len);
+ RR->node->putPacket((void *)0,*i1,*i2,data,len);
return true;
}
}
@@ -679,7 +679,7 @@ void Cluster::relayViaCluster(const Address &fromPeerAddress,const Address &toPe
for(std::vector<InetAddress>::const_iterator i2(_members[mostRecentMemberId].zeroTierPhysicalEndpoints.begin());i2!=_members[mostRecentMemberId].zeroTierPhysicalEndpoints.end();++i2) {
if (i1->ss_family == i2->ss_family) {
TRACE("relayViaCluster relaying %u bytes from %s to %s by way of %u (%s->%s)",len,fromPeerAddress.toString().c_str(),toPeerAddress.toString().c_str(),(unsigned int)mostRecentMemberId,i1->toString().c_str(),i2->toString().c_str());
- RR->node->putPacket(*i1,*i2,data,len);
+ RR->node->putPacket((void *)0,*i1,*i2,data,len);
return;
}
}
@@ -981,7 +981,7 @@ void Cluster::_flush(uint16_t memberId)
void Cluster::_doREMOTE_WHOIS(uint64_t fromMemberId,const Packet &remotep)
{
if (remotep.payloadLength() >= ZT_ADDRESS_LENGTH) {
- Identity queried(RR->topology->getIdentity(Address(remotep.payload(),ZT_ADDRESS_LENGTH)));
+ Identity queried(RR->topology->getIdentity((void *)0,Address(remotep.payload(),ZT_ADDRESS_LENGTH)));
if (queried) {
Buffer<1024> routp;
remotep.source().appendTo(routp);
diff --git a/node/Node.cpp b/node/Node.cpp
index 4e8d6655..e7dc637f 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -285,7 +285,7 @@ ZT_ResultCode Node::processBackgroundTasks(void *tptr,uint64_t now,volatile uint
#ifdef ZT_ENABLE_CLUSTER
// If clustering is enabled we have to call cluster->doPeriodicTasks() very often, so we override normal timer deadline behavior
if (RR->cluster) {
- RR->sw->doTimerTasks(now);
+ RR->sw->doTimerTasks(tptr,now);
RR->cluster->doPeriodicTasks();
*nextBackgroundTaskDeadline = now + ZT_CLUSTER_PERIODIC_TASK_PERIOD; // this is really short so just tick at this rate
} else {
@@ -686,7 +686,7 @@ void Node::postTrace(const char *module,unsigned int line,const char *fmt,...)
tmp2[sizeof(tmp2)-1] = (char)0;
Utils::snprintf(tmp1,sizeof(tmp1),"[%s] %s:%u %s",nowstr,module,line,tmp2);
- postEvent(ZT_EVENT_TRACE,tmp1);
+ postEvent((void *)0,ZT_EVENT_TRACE,tmp1);
}
#endif // ZT_TRACE
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 0cc23e33..0795a6ea 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -103,7 +103,7 @@ void Peer::received(
}
outp.append((uint16_t)redirectTo.port());
outp.armor(_key,true,path->nextOutgoingCounter());
- path->send(RR,outp.data(),outp.size(),now);
+ path->send(RR,tPtr,outp.data(),outp.size(),now);
} else {
// For older peers we use RENDEZVOUS to coax them into contacting us elsewhere.
Packet outp(_id.address(),RR->identity.address(),Packet::VERB_RENDEZVOUS);
@@ -118,7 +118,7 @@ void Peer::received(
outp.append(redirectTo.rawIpData(),16);
}
outp.armor(_key,true,path->nextOutgoingCounter());
- path->send(RR,outp.data(),outp.size(),now);
+ path->send(RR,tPtr,outp.data(),outp.size(),now);
}
suboptimalPath = true;
}
diff --git a/node/Switch.cpp b/node/Switch.cpp
index 62674472..56299a9a 100644
--- a/node/Switch.cpp
+++ b/node/Switch.cpp
@@ -863,7 +863,7 @@ bool Switch::_trySend(void *tPtr,Packet &packet,bool encrypt)
Packet::Fragment frag(packet,fragStart,chunkSize,fno,totalFragments);
#ifdef ZT_ENABLE_CLUSTER
if (viaPath)
- viaPath->send(RR,frag.data(),frag.size(),now);
+ viaPath->send(RR,tPtr,frag.data(),frag.size(),now);
else if (clusterMostRecentMemberId >= 0)
RR->cluster->sendViaCluster(clusterMostRecentMemberId,destination,frag.data(),frag.size());
#else