summaryrefslogtreecommitdiff
path: root/node/Multicaster.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-26 17:45:19 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-09-26 17:45:19 -0400
commit4e010da54b3d660376e4d583a2ca3e8befd60899 (patch)
treeffcd242ca205bb351556b7ba6e24232451042ccc /node/Multicaster.cpp
parent24bad9f3d1119c4bf80e28f33d4241c7e6221877 (diff)
downloadinfinitytier-4e010da54b3d660376e4d583a2ca3e8befd60899.tar.gz
infinitytier-4e010da54b3d660376e4d583a2ca3e8befd60899.zip
Work in progress...
Diffstat (limited to 'node/Multicaster.cpp')
-rw-r--r--node/Multicaster.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp
index e545289e..36fd98fd 100644
--- a/node/Multicaster.cpp
+++ b/node/Multicaster.cpp
@@ -76,15 +76,6 @@ void Multicaster::bringCloser(uint64_t nwid,const Address &a)
}
}
-void Multicaster::got(uint64_t nwid,const Address &peer,uint64_t mcGuid)
-{
- Mutex::Lock _l(_lock);
- _NetInfo &n = _nets[nwid];
- std::pair< uint64_t,std::set<Address> > &g = n.got[mcGuid];
- g.first = Utils::now();
- g.second.insert(peer);
-}
-
void Multicaster::clean()
{
Mutex::Lock _l(_lock);
@@ -92,14 +83,8 @@ void Multicaster::clean()
uint64_t now = Utils::now();
for(std::map< uint64_t,_NetInfo >::iterator n(_nets.begin());n!=_nets.end();) {
- for(std::map< uint64_t,std::pair< uint64_t,std::set<Address> > >::iterator g(n->second.got.begin());g!=n->second.got.end();) {
- if ((now - g->second.first) > ZT_MULTICAST_MAGNET_STATE_EXPIRE)
- n->second.got.erase(g++);
- else ++g;
- }
-
for(std::map< _Subscription,_SubInfo >::iterator s(n->second.subscriptions.begin());s!=n->second.subscriptions.end();) {
- if ((now - s->second.lastLike) > ZT_MULTICAST_LIKE_EXPIRE) {
+ if ((now - s->second.lastLike) >= ZT_MULTICAST_LIKE_EXPIRE) {
std::map< MulticastGroup,std::list< Address > >::iterator p(n->second.proximity.find(s->first.second));
p->second.erase(s->second.proximitySlot);
if (p->second.empty())