mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
add new files & remove old ones from VS project. Now builds & runs on Windows again
This commit is contained in:
parent
8cced06a2d
commit
8ffae313fd
8 changed files with 61 additions and 30 deletions
|
@ -232,7 +232,7 @@ Membership::AddCredentialResult Membership::addCredential(const RuntimeEnvironme
|
|||
|
||||
Membership::_RemoteTag *Membership::_newTag(const uint64_t id)
|
||||
{
|
||||
_RemoteTag *t;
|
||||
_RemoteTag *t = NULL;
|
||||
uint64_t minlr = 0xffffffffffffffffULL;
|
||||
for(unsigned int i=0;i<ZT_MAX_NETWORK_TAGS;++i) {
|
||||
if (_remoteTags[i]->id == ZT_MEMBERSHIP_CRED_ID_UNUSED) {
|
||||
|
@ -243,17 +243,21 @@ Membership::_RemoteTag *Membership::_newTag(const uint64_t id)
|
|||
minlr = _remoteTags[i]->lastReceived;
|
||||
}
|
||||
}
|
||||
t->id = id;
|
||||
t->lastReceived = 0;
|
||||
t->revocationThreshold = 0;
|
||||
t->tag = Tag();
|
||||
|
||||
if (t) {
|
||||
t->id = id;
|
||||
t->lastReceived = 0;
|
||||
t->revocationThreshold = 0;
|
||||
t->tag = Tag();
|
||||
}
|
||||
|
||||
std::sort(&(_remoteTags[0]),&(_remoteTags[ZT_MAX_NETWORK_TAGS]),_RemoteCredentialSorter<_RemoteTag>());
|
||||
return t;
|
||||
}
|
||||
|
||||
Membership::_RemoteCapability *Membership::_newCapability(const uint64_t id)
|
||||
{
|
||||
_RemoteCapability *c;
|
||||
_RemoteCapability *c = NULL;
|
||||
uint64_t minlr = 0xffffffffffffffffULL;
|
||||
for(unsigned int i=0;i<ZT_MAX_NETWORK_CAPABILITIES;++i) {
|
||||
if (_remoteCaps[i]->id == ZT_MEMBERSHIP_CRED_ID_UNUSED) {
|
||||
|
@ -264,10 +268,14 @@ Membership::_RemoteCapability *Membership::_newCapability(const uint64_t id)
|
|||
minlr = _remoteCaps[i]->lastReceived;
|
||||
}
|
||||
}
|
||||
c->id = id;
|
||||
c->lastReceived = 0;
|
||||
c->revocationThreshold = 0;
|
||||
c->cap = Capability();
|
||||
|
||||
if (c) {
|
||||
c->id = id;
|
||||
c->lastReceived = 0;
|
||||
c->revocationThreshold = 0;
|
||||
c->cap = Capability();
|
||||
}
|
||||
|
||||
std::sort(&(_remoteCaps[0]),&(_remoteCaps[ZT_MAX_NETWORK_CAPABILITIES]),_RemoteCredentialSorter<_RemoteCapability>());
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -343,7 +343,7 @@ void Multicaster::clean(uint64_t now)
|
|||
{
|
||||
Mutex::Lock _l(_gatherAuth_m);
|
||||
_GatherAuthKey *k = (_GatherAuthKey *)0;
|
||||
uint64_t *ts = (uint64_t *)ts;
|
||||
uint64_t *ts = NULL;
|
||||
Hashtable<_GatherAuthKey,uint64_t>::Iterator i(_gatherAuth);
|
||||
while (i.next(k,ts)) {
|
||||
if ((now - *ts) >= ZT_MULTICAST_CREDENTIAL_EXPIRATON)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue