Yet more cleanup, it builds again now.

This commit is contained in:
Adam Ierymenko 2019-08-21 14:36:56 -07:00
parent 0b5472f9fb
commit 95a6fce2b4
No known key found for this signature in database
GPG key ID: 1657198823E52A61
8 changed files with 92 additions and 111 deletions

View file

@ -1998,7 +1998,7 @@ public:
{
const Hashtable< uint64_t,std::vector<InetAddress> > *lh = (const Hashtable< uint64_t,std::vector<InetAddress> > *)0;
if (family < 0)
lh = (_node->prng() & 1) ? &_v4Hints : &_v6Hints;
lh = (Utils::random() & 1) ? &_v4Hints : &_v6Hints;
else if (family == AF_INET)
lh = &_v4Hints;
else if (family == AF_INET6)
@ -2006,7 +2006,7 @@ public:
else return 0;
const std::vector<InetAddress> *l = lh->get(ztaddr);
if ((l)&&(l->size() > 0)) {
memcpy(result,&((*l)[(unsigned long)_node->prng() % l->size()]),sizeof(struct sockaddr_storage));
memcpy(result,&((*l)[(unsigned long)Utils::random() % l->size()]),sizeof(struct sockaddr_storage));
return 1;
} else return 0;
}