Integrating authentication - now all authentication attempts fail (still work in progress).

This commit is contained in:
lotodore
2009-09-26 16:05:35 +00:00
parent b15b845077
commit 48c4c69277
8 changed files with 19 additions and 15 deletions
+3 -2
View File
@@ -883,7 +883,7 @@ ServerLobbyThread::HandleNetPacketInit(SessionWrapper session, const InitMessage
memcpy(avatarMD5.data, authLogin->avatar->buf, MD5_DATA_SIZE);
}
else
SessionError(session, ERR_NET_INVALID_PASSWORD); // TODO not yet supported
SessionError(session, ERR_NET_INVALID_PASSWORD);
// Check the server password.
/* if (!CheckPassword(initData.password))
@@ -1268,6 +1268,7 @@ ServerLobbyThread::AuthenticationSuccess(unsigned playerId, db_id dbPlayerId)
void
ServerLobbyThread::AuthenticationFailure(unsigned playerId)
{
SessionError(m_sessionManager.GetSessionByUniquePlayerId(playerId, true), ERR_NET_INVALID_PASSWORD);
}
void
@@ -1578,7 +1579,7 @@ ServerLobbyThread::InternalCheckSessionTimeouts(SessionWrapper session)
void
ServerLobbyThread::SessionError(SessionWrapper session, int errorCode)
{
if (session.sessionData.get())
if (session.sessionData)
{
SendError(session.sessionData, errorCode);
CloseSession(session);