diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-07 11:13:17 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-09-07 11:13:17 -0700 |
commit | b5c86b6ba4112b23e46170fe241b4688532b493e (patch) | |
tree | 01d77467768c48efae59a5397eae119724bc4ceb /service/ControlPlane.cpp | |
parent | f2d2df2b112c8a644b718abc521af296a83b5337 (diff) | |
download | infinitytier-b5c86b6ba4112b23e46170fe241b4688532b493e.tar.gz infinitytier-b5c86b6ba4112b23e46170fe241b4688532b493e.zip |
Bunch more path refactoring. Peers no longer forget paths, but do not normally use expired paths. Expired paths might still be tried if nothing else is reachable.
Diffstat (limited to 'service/ControlPlane.cpp')
-rw-r--r-- | service/ControlPlane.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp index a24e3eb4..b443a7fa 100644 --- a/service/ControlPlane.cpp +++ b/service/ControlPlane.cpp @@ -183,14 +183,16 @@ static std::string _jsonEnumerate(unsigned int depth,const ZT_PeerPhysicalPath * "%s\t\"address\": \"%s\",\n" "%s\t\"lastSend\": %llu,\n" "%s\t\"lastReceive\": %llu,\n" - "%s\t\"active\": true,\n" + "%s\t\"active\": %s,\n" + "%s\t\"expired\": %s,\n" "%s\t\"preferred\": %s,\n" "%s\t\"trustedPathId\": %llu\n" "%s}", prefix,_jsonEscape(reinterpret_cast<const InetAddress *>(&(pp[i].address))->toString()).c_str(), prefix,pp[i].lastSend, prefix,pp[i].lastReceive, - prefix, + prefix,(pp[i].expired != 0) ? "false" : "true", + prefix,(pp[i].expired == 0) ? "false" : "true", prefix,(pp[i].preferred == 0) ? "false" : "true", prefix,pp[i].trustedPathId, prefix); |