db: fix login-by-key peer handle usage
This commit is contained in:
@@ -235,7 +235,7 @@ void CClientManager::QUERY_LOGIN_BY_KEY(CPeer * pkPeer, DWORD dwHandle, TPacketG
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
if (!LoadPlayerIndexByAccountId(info->pAccountTable->id, info->pAccountTable, &found))
|
if (!LoadPlayerIndexByAccountId(info->pAccountTable->id, info->pAccountTable, &found))
|
||||||
{
|
{
|
||||||
peer->EncodeReturn(DG::LOGIN_NOT_EXIST, info->dwHandle);
|
pkPeer->EncodeReturn(DG::LOGIN_NOT_EXIST, info->dwHandle);
|
||||||
delete info->pAccountTable;
|
delete info->pAccountTable;
|
||||||
delete info;
|
delete info;
|
||||||
return;
|
return;
|
||||||
@@ -249,7 +249,7 @@ void CClientManager::QUERY_LOGIN_BY_KEY(CPeer * pkPeer, DWORD dwHandle, TPacketG
|
|||||||
!LoadPlayerIndexByAccountId(info->pAccountTable->id, info->pAccountTable, &found) ||
|
!LoadPlayerIndexByAccountId(info->pAccountTable->id, info->pAccountTable, &found) ||
|
||||||
!found)
|
!found)
|
||||||
{
|
{
|
||||||
peer->EncodeReturn(DG::LOGIN_NOT_EXIST, info->dwHandle);
|
pkPeer->EncodeReturn(DG::LOGIN_NOT_EXIST, info->dwHandle);
|
||||||
delete info->pAccountTable;
|
delete info->pAccountTable;
|
||||||
delete info;
|
delete info;
|
||||||
return;
|
return;
|
||||||
@@ -273,7 +273,7 @@ void CClientManager::QUERY_LOGIN_BY_KEY(CPeer * pkPeer, DWORD dwHandle, TPacketG
|
|||||||
GetTablePostfix(), info->pAccountTable->id);
|
GetTablePostfix(), info->pAccountTable->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
CDBManager::instance().ReturnQuery(szQuery, QID_LOGIN, peer->GetHandle(), info);
|
CDBManager::instance().ReturnQuery(szQuery, QID_LOGIN, pkPeer->GetHandle(), info);
|
||||||
}
|
}
|
||||||
|
|
||||||
TAccountTable * CreateAccountTableFromRes(MYSQL_RES * res)
|
TAccountTable * CreateAccountTableFromRes(MYSQL_RES * res)
|
||||||
|
|||||||
Reference in New Issue
Block a user