Fixed race condition where client cookie callbacks could be fired against wrong clients (bug 3375).

This commit is contained in:
David Anderson
2008-10-31 08:28:08 -05:00
parent 8d78c74554
commit 3c18289465
4 changed files with 25 additions and 10 deletions
+5 -5
View File
@@ -51,7 +51,7 @@ void TQueryOp::RunThinkPart()
case Query_SelectData:
{
g_CookieManager.ClientConnectCallback(m_client, m_pResult);
g_CookieManager.ClientConnectCallback(m_userid, m_pResult);
break;
}
@@ -84,10 +84,10 @@ void TQueryOp::RunThreadPart()
if (!BindParamsAndRun())
{
g_pSM->LogError(myself,
"Failed SQL Query, Error: \"%s\" (Query id %i - client %i)",
"Failed SQL Query, Error: \"%s\" (Query id %i - userid %i)",
m_database->GetError(),
m_type,
m_client);
m_userid);
}
m_database->UnlockFromFullAtomicOperation();
@@ -115,10 +115,10 @@ void TQueryOp::Destroy()
delete this;
}
TQueryOp::TQueryOp(enum querytype type, int client)
TQueryOp::TQueryOp(enum querytype type, int userid)
{
m_type = type;
m_client = client;
m_userid = userid;
m_database = NULL;
m_insertId = -1;
m_pResult = NULL;