last dests list forming edited
This commit is contained in:
+7
-2
@@ -51,14 +51,19 @@ void Statistics::report(const LogEvent& event)
|
||||
}
|
||||
|
||||
m_lastDestinationsMtx.lock();
|
||||
if (not m_lastDestinations.contains(event.dest))
|
||||
int index = m_lastDestinations.indexOf(event.dest);
|
||||
if (index == -1)
|
||||
{
|
||||
if (m_lastDestinations.size() == 5)
|
||||
{
|
||||
m_lastDestinations.pop_back();
|
||||
}
|
||||
m_lastDestinations.push_front(event.dest);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lastDestinations.removeAt(index);
|
||||
}
|
||||
m_lastDestinations.push_front(event.dest);
|
||||
m_lastDestinationsMtx.unlock();
|
||||
|
||||
if (g::p::IGNORE_IP_ADDRS_IN_STATISTCS and isIpAddress(event.dest))
|
||||
|
||||
Reference in New Issue
Block a user