mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-20 17:52:46 +00:00
Small bug fix and warning removal.
This commit is contained in:
parent
2ea9f516e1
commit
25f9c294dc
@ -1776,11 +1776,13 @@ void EmbeddedNetworkController::_pushMemberUpdate(uint64_t now,uint64_t nwid,con
|
||||
std::map<std::pair<uint64_t,uint64_t>,uint64_t>::iterator lrt(_lastRequestTime.find(std::pair<uint64_t,uint64_t>(id.address().toInt(),nwid)));
|
||||
online = ( (lrt != _lastRequestTime.end()) && ((now - lrt->second) < ZT_NETWORK_AUTOCONF_DELAY) );
|
||||
}
|
||||
Dictionary<ZT_NETWORKCONFIG_METADATA_DICT_CAPACITY> *metaData = new Dictionary<ZT_NETWORKCONFIG_METADATA_DICT_CAPACITY>(mdstr.c_str());
|
||||
try {
|
||||
this->request(nwid,InetAddress(),0,id,*metaData);
|
||||
} catch ( ... ) {}
|
||||
delete metaData;
|
||||
if (online) {
|
||||
Dictionary<ZT_NETWORKCONFIG_METADATA_DICT_CAPACITY> *metaData = new Dictionary<ZT_NETWORKCONFIG_METADATA_DICT_CAPACITY>(mdstr.c_str());
|
||||
try {
|
||||
this->request(nwid,InetAddress(),0,id,*metaData);
|
||||
} catch ( ... ) {}
|
||||
delete metaData;
|
||||
}
|
||||
}
|
||||
} catch ( ... ) {}
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ struct InetAddress : public sockaddr_storage
|
||||
} else {
|
||||
unsigned long tmp = reinterpret_cast<const struct sockaddr_in6 *>(this)->sin6_port;
|
||||
const uint8_t *a = reinterpret_cast<const uint8_t *>(this);
|
||||
for(long i=0;i<sizeof(InetAddress);++i)
|
||||
for(long i=0;i<(long)sizeof(InetAddress);++i)
|
||||
reinterpret_cast<uint8_t *>(&tmp)[i % sizeof(tmp)] ^= a[i];
|
||||
return tmp;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user