mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Just a little cleanup
This commit is contained in:
parent
bdb2cc7c85
commit
2d289a3308
1 changed files with 8 additions and 0 deletions
|
@ -531,10 +531,12 @@ public:
|
||||||
#ifdef ZT_USE_MINIUPNPC
|
#ifdef ZT_USE_MINIUPNPC
|
||||||
,_portMapper((PortMapper *)0)
|
,_portMapper((PortMapper *)0)
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ZT_VAULT_SUPPORT
|
||||||
,_vaultEnabled(false)
|
,_vaultEnabled(false)
|
||||||
,_vaultURL()
|
,_vaultURL()
|
||||||
,_vaultToken()
|
,_vaultToken()
|
||||||
,_vaultPath("cubbyhole/zerotier")
|
,_vaultPath("cubbyhole/zerotier")
|
||||||
|
#endif
|
||||||
,_run(true)
|
,_run(true)
|
||||||
{
|
{
|
||||||
_ports[0] = 0;
|
_ports[0] = 0;
|
||||||
|
@ -551,6 +553,10 @@ public:
|
||||||
_binder.closeAll(_phy);
|
_binder.closeAll(_phy);
|
||||||
_phy.close(_localControlSocket4);
|
_phy.close(_localControlSocket4);
|
||||||
_phy.close(_localControlSocket6);
|
_phy.close(_localControlSocket6);
|
||||||
|
#if ZT_VAULT_SUPPORT
|
||||||
|
curl_global_cleanup();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ZT_USE_MINIUPNPC
|
#ifdef ZT_USE_MINIUPNPC
|
||||||
delete _portMapper;
|
delete _portMapper;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1541,6 +1547,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ZT_VAULT_SUPPORT
|
||||||
json &vault = settings["vault"];
|
json &vault = settings["vault"];
|
||||||
if (vault.is_object()) {
|
if (vault.is_object()) {
|
||||||
const std::string url(OSUtils::jsonString(vault["vaultURL"], "").c_str());
|
const std::string url(OSUtils::jsonString(vault["vaultURL"], "").c_str());
|
||||||
|
@ -1579,6 +1586,7 @@ public:
|
||||||
if (!_vaultURL.empty() && !_vaultToken.empty()) {
|
if (!_vaultURL.empty() && !_vaultToken.empty()) {
|
||||||
_vaultEnabled = true;
|
_vaultEnabled = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks if a managed IP or route target is allowed
|
// Checks if a managed IP or route target is allowed
|
||||||
|
|
Loading…
Add table
Reference in a new issue