mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-12 20:28:27 +00:00
Compile fixes, integration of fast PRNG.
This commit is contained in:
@ -143,7 +143,7 @@ Demarc::Port Demarc::pick(const InetAddress &to) const
|
||||
}
|
||||
}
|
||||
if (possibilities.size())
|
||||
return possibilities[_r->prng.next32() % possibilities.size()]->first;
|
||||
return possibilities[_r->prng->next32() % possibilities.size()]->first;
|
||||
else return NULL_PORT;
|
||||
} catch ( ... ) {
|
||||
return NULL_PORT;
|
||||
@ -174,7 +174,7 @@ Demarc::Port Demarc::send(Demarc::Port fromPort,const InetAddress &to,const void
|
||||
}
|
||||
}
|
||||
if (possibilities.size())
|
||||
pe = possibilities[_r->prng.next32() % possibilities.size()];
|
||||
pe = possibilities[_r->prng->next32() % possibilities.size()];
|
||||
else {
|
||||
_ports_m.unlock();
|
||||
return NULL_PORT;
|
||||
|
Reference in New Issue
Block a user