mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-21 13:54:15 -07:00
Cleanup and make moons (federated roots) a little easier to deal with.
This commit is contained in:
parent
cdc289fa9c
commit
42f28bce52
10 changed files with 107 additions and 98 deletions
|
@ -226,8 +226,8 @@ static void _jsonAppend(unsigned int depth,std::string &buf,const ZT_Peer *peer)
|
|||
const char *prole = "";
|
||||
switch(peer->role) {
|
||||
case ZT_PEER_ROLE_LEAF: prole = "LEAF"; break;
|
||||
case ZT_PEER_ROLE_UPSTREAM: prole = "UPSTREAM"; break;
|
||||
case ZT_PEER_ROLE_ROOT: prole = "ROOT"; break;
|
||||
case ZT_PEER_ROLE_MOON: prole = "MOON"; break;
|
||||
case ZT_PEER_ROLE_PLANET: prole = "PLANET"; break;
|
||||
}
|
||||
|
||||
Utils::snprintf(json,sizeof(json),
|
||||
|
|
|
@ -707,7 +707,7 @@ public:
|
|||
for(std::vector<std::string>::iterator f(moonsDotD.begin());f!=moonsDotD.end();++f) {
|
||||
std::size_t dot = f->find_last_of('.');
|
||||
if ((dot == 16)&&(f->substr(16) == ".moon"))
|
||||
_node->orbit(Utils::hexStrToU64(f->substr(0,dot).c_str()));
|
||||
_node->orbit(Utils::hexStrToU64(f->substr(0,dot).c_str()),0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue