mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 05:13:58 -07:00
Prep for real tests like alltoall.
This commit is contained in:
parent
a75a7547b4
commit
8672ca9cf8
4 changed files with 40 additions and 14 deletions
|
@ -57,6 +57,10 @@ EthernetTap *TestEthernetTapFactory::open(
|
|||
Mutex::Lock _l(_tapsByMac_m);
|
||||
_tapsByMac[mac] = tap;
|
||||
}
|
||||
{
|
||||
Mutex::Lock _l(_tapsByNwid_m);
|
||||
_tapsByNwid[nwid] = tap;
|
||||
}
|
||||
return tap.ptr();
|
||||
}
|
||||
|
||||
|
@ -73,6 +77,10 @@ void TestEthernetTapFactory::close(EthernetTap *tap,bool destroyPersistentDevice
|
|||
Mutex::Lock _l(_tapsByMac_m);
|
||||
_tapsByMac.erase(tapp->mac());
|
||||
}
|
||||
{
|
||||
Mutex::Lock _l(_tapsByNwid_m);
|
||||
_tapsByNwid.erase(tapp->nwid());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue