This commit is contained in:
Adam Ierymenko 2019-03-19 16:43:43 -07:00
parent 087c75d5ee
commit 63ec19674c
14 changed files with 96 additions and 169 deletions

View file

@ -67,10 +67,7 @@ public:
Membership();
/**
* Send COM and other credentials to this peer if needed
*
* This checks last pushed times for our COM and for other credentials and
* sends VERB_NETWORK_CREDENTIALS if the recipient might need them.
* Send COM and other credentials to this peer
*
* @param RR Runtime environment
* @param tPtr Thread pointer to be handed through to any callbacks called as a result of this call
@ -78,9 +75,8 @@ public:
* @param peerAddress Address of member peer (the one that this Membership describes)
* @param nconf My network config
* @param localCapabilityIndex Index of local capability to include (in nconf.capabilities[]) or -1 if none
* @param force If true, send objects regardless of last push time
*/
void pushCredentials(const RuntimeEnvironment *RR,void *tPtr,const int64_t now,const Address &peerAddress,const NetworkConfig &nconf,int localCapabilityIndex,const bool force);
void pushCredentials(const RuntimeEnvironment *RR,void *tPtr,const int64_t now,const Address &peerAddress,const NetworkConfig &nconf,int localCapabilityIndex);
/**
* Check whether we should push MULTICAST_LIKEs to this peer, and update last sent time if true
@ -182,17 +178,6 @@ public:
*/
void clean(const int64_t now,const NetworkConfig &nconf);
/**
* Reset last pushed time for local credentials
*
* This is done when we update our network configuration and our credentials have changed
*/
inline void resetPushState()
{
_lastPushedCom = 0;
memset(&_localCredLastPushed,0,sizeof(_localCredLastPushed));
}
/**
* Generates a key for the internal use in indexing credentials by type and credential ID
*/
@ -225,9 +210,6 @@ private:
// Last time we pushed MULTICAST_LIKE(s)
int64_t _lastUpdatedMulticast;
// Last time we pushed our COM to this peer
int64_t _lastPushedCom;
// Revocation threshold for COM or 0 if none
int64_t _comRevocationThreshold;
@ -242,13 +224,6 @@ private:
Hashtable< uint32_t,Capability > _remoteCaps;
Hashtable< uint32_t,CertificateOfOwnership > _remoteCoos;
// Time we last pushed our local credentials to this member
struct {
int64_t tag[ZT_MAX_NETWORK_TAGS];
int64_t cap[ZT_MAX_NETWORK_CAPABILITIES];
int64_t coo[ZT_MAX_CERTIFICATES_OF_OWNERSHIP];
} _localCredLastPushed;
public:
class CapabilityIterator
{