Tags work.

This commit is contained in:
Adam Ierymenko 2017-02-07 14:06:40 -08:00
parent 672f17c6e9
commit cdc289fa9c
3 changed files with 5 additions and 8 deletions

View file

@ -83,11 +83,8 @@ void Membership::pushCredentials(const RuntimeEnvironment *RR,const uint64_t now
outp.addSize(2);
unsigned int thisPacketTagCount = 0;
while ((tagPtr < sendTagCount)&&((outp.size() + sizeof(Tag) + 32) < ZT_PROTO_MAX_PACKET_LENGTH)) {
if ( (_localTags[tagPtr].id != nconf.tags[tagPtr].id()) || ((now - _localTags[tagPtr].lastPushed) >= ZT_CREDENTIAL_PUSH_EVERY) || (force) ) {
sendTags[tagPtr]->serialize(outp);
++thisPacketTagCount;
}
++tagPtr;
sendTags[tagPtr++]->serialize(outp);
++thisPacketTagCount;
}
outp.setAt(tagCountAt,(uint16_t)thisPacketTagCount);