mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-17 06:38:25 +00:00
Fix evil bug, and instrument/assert on some other stuff, and a bit of cleanup.
This commit is contained in:
@ -113,24 +113,12 @@ public:
|
||||
*/
|
||||
void saveIdentity(const Identity &id);
|
||||
|
||||
/**
|
||||
* @return Vector of peers that are root servers
|
||||
*/
|
||||
inline std::vector< SharedPtr<Peer> > rootPeers() const
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
return _rootPeers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current favorite root server
|
||||
*
|
||||
* @return Root server with lowest latency or NULL if none
|
||||
*/
|
||||
inline SharedPtr<Peer> getBestRoot()
|
||||
{
|
||||
return getBestRoot((const Address *)0,0,false);
|
||||
}
|
||||
inline SharedPtr<Peer> getBestRoot() { return getBestRoot((const Address *)0,0,false); }
|
||||
|
||||
/**
|
||||
* Get the best root server, avoiding root servers listed in an array
|
||||
@ -237,7 +225,7 @@ public:
|
||||
while (i.next(a,p)) {
|
||||
#ifdef ZT_TRACE
|
||||
if (!(*p)) {
|
||||
fprintf(stderr,"FATAL BUG: eachPeer() caught NULL peer for %s -- peer pointers in Topology should NEVER be NULL",a->toString().c_str());
|
||||
fprintf(stderr,"FATAL BUG: eachPeer() caught NULL peer for %s -- peer pointers in Topology should NEVER be NULL"ZT_EOL_S,a->toString().c_str());
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user