Fix a possible excessive memory use issue in controller and clean up a bunch of COM handling and other code in the normal node.

This commit is contained in:
Adam Ierymenko 2022-04-19 19:59:54 -04:00
parent fe0068da52
commit ef08346a74
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
8 changed files with 17 additions and 18 deletions

View file

@ -115,7 +115,7 @@ Membership::AddCredentialResult Membership::addCredential(const RuntimeEnvironme
RR->t->credentialRejected(tPtr,com,"old");
return ADD_REJECTED;
}
if ((newts == oldts)&&(_com == com))
if (_com == com)
return ADD_ACCEPTED_REDUNDANT;
switch(com.verify(RR,tPtr)) {
@ -123,6 +123,7 @@ Membership::AddCredentialResult Membership::addCredential(const RuntimeEnvironme
RR->t->credentialRejected(tPtr,com,"invalid");
return ADD_REJECTED;
case 0:
//printf("%.16llx %.10llx replacing COM %lld with %lld\n", com.networkId(), com.issuedTo().toInt(), _com.timestamp(), com.timestamp()); fflush(stdout);
_com = com;
return ADD_ACCEPTED_NEW;
case 1: