Core/Threading: Significantly reduced the severity of possible data race during player login

* This commit changes a data race on a pointer value to data race on integers (guid)

(cherry picked from commit dbe20510569e6bd4a26892be84289b5864350ea6)
This commit is contained in:
Shauren committed 2015-10-31 15:41:32 +01:00
1 parent 517a30d7c1
commit b95648ae27
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -171,11 +171,11 @@ std::string WorldSession::GetPlayerInfo() const
{
std::ostringstream ss;
ss << "[Player: " << GetPlayerName() << " (";
if (_player != NULL)
ss << _player->GetGUID().ToString() << ", ";
ss << "[Player: ";
if (!m_playerLoading && _player)
ss << _player->GetName() << ' ' << _player->GetGUID().ToString() << ", ";
ss << "Account: " << GetAccountId() << ")]";
ss << "Account: " << GetAccountId() << "]";
return ss.str();
}
+1 -1
View File
@@ -446,7 +446,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
// Must be done before WorldSession is created
bool wardenActive = sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED);
if (wardenActive && account.OS != "Win" && account.OS != "Wn64" && account.OS != "Mc64")
if (wardenActive && account.OS != "Win" && account.OS != "OSX")
{
SendAuthResponseError(AUTH_REJECT);
TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", address.c_str(), account.OS.c_str());