-STG_LOCKER lock(&mutex);
-ipToDel.push_back(ip);
-}
-//-----------------------------------------------------------------------------
-void STG_PINGER::RealAddIP()
-{
-STG_LOCKER lock(&mutex);
-
-std::list<uint32_t>::iterator iter;
-iter = ipToAdd.begin();
-while (iter != ipToAdd.end())
- {
- pingIP.insert(std::make_pair(*iter, 0));
- ++iter;
- }
-ipToAdd.erase(ipToAdd.begin(), ipToAdd.end());
-}
-//-----------------------------------------------------------------------------
-void STG_PINGER::RealDelIP()
-{
-STG_LOCKER lock(&mutex);
-
-std::list<uint32_t>::iterator iter;
-std::multimap<uint32_t, time_t>::iterator treeIter;
-iter = ipToDel.begin();
-while (iter != ipToDel.end())
- {
- treeIter = pingIP.find(*iter);
- if (treeIter != pingIP.end())
- pingIP.erase(treeIter);
-
- ++iter;
- }
-ipToDel.erase(ipToDel.begin(), ipToDel.end());
+ std::lock_guard lock(m_mutex);
+ auto it = m_pingIPs.find(ip);
+ if (it != m_pingIPs.end())
+ m_pingIPs.erase(it);