Fixing session counter with regard to spectators.

This commit is contained in:
lotodore
2013-06-29 23:44:00 +02:00
parent ec50aa3268
commit 0be7632875
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -302,7 +302,7 @@ SessionManager::GetRawSessionCount()
}
unsigned
SessionManager::GetEstablishedSessionCount()
SessionManager::GetSessionCountWithState(int state)
{
unsigned counter = 0;
boost::recursive_mutex::scoped_lock lock(m_sessionMapMutex);
@@ -311,7 +311,7 @@ SessionManager::GetEstablishedSessionCount()
SessionMap::const_iterator end = m_sessionMap.end();
while (i != end) {
if ((*i).second->GetState() >= SessionData::Established)
if ((i->second->GetState() & state) != 0)
++counter;
++i;
}