summaryrefslogtreecommitdiff
path: root/node/Node.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-12-04 14:40:10 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-12-04 14:40:10 -0800
commit16613ab5fb5a1f6cb1271ae67e68836a1898023d (patch)
tree7645a268b922c5786985f1e4348279e2b68fa0be /node/Node.cpp
parentc26bf45e28fcf74ce2f0adff5a67787794c30940 (diff)
downloadinfinitytier-16613ab5fb5a1f6cb1271ae67e68836a1898023d.tar.gz
infinitytier-16613ab5fb5a1f6cb1271ae67e68836a1898023d.zip
Clean up remote tracing code, add per-network remote trace settings, add remote trace level, and make local trace output readable again.
Diffstat (limited to 'node/Node.cpp')
-rw-r--r--node/Node.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/node/Node.cpp b/node/Node.cpp
index f0fcb4d7..ef8925d5 100644
--- a/node/Node.cpp
+++ b/node/Node.cpp
@@ -61,7 +61,8 @@ Node::Node(void *uptr,void *tptr,const struct ZT_Node_Callbacks *callbacks,int64
_networks(8),
_now(now),
_lastPingCheck(0),
- _lastHousekeepingRun(0)
+ _lastHousekeepingRun(0),
+ _lastMemoizedTraceSettings(0)
{
if (callbacks->version != 0)
throw ZT_EXCEPTION_INVALID_ARGUMENT;
@@ -299,6 +300,11 @@ ZT_ResultCode Node::processBackgroundTasks(void *tptr,int64_t now,volatile int64
timeUntilNextPingCheck -= (unsigned long)timeSinceLastPingCheck;
}
+ if ((now - _lastMemoizedTraceSettings) >= 10000) {
+ _lastMemoizedTraceSettings = now;
+ RR->t->updateMemoizedSettings();
+ }
+
if ((now - _lastHousekeepingRun) >= ZT_HOUSEKEEPING_PERIOD) {
_lastHousekeepingRun = now;
try {