mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
remove players from db as well as runtime when ack times out
This commit is contained in:
parent
ca6039e890
commit
50c387d75e
3 changed files with 8 additions and 0 deletions
|
@ -826,6 +826,7 @@ CookieRef::modPending( const CRefEvent* evt, bool keep )
|
|||
if ( keep ) {
|
||||
iter->m_ackPending = false;
|
||||
} else {
|
||||
DBMgr::Get()->RmPlayers( ConnName(), iter->m_nPlayersH );
|
||||
m_sockets.erase( iter );
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -179,6 +179,12 @@ DBMgr::AddPlayers( const char* connName, int nToAdd )
|
|||
execSql( query );
|
||||
}
|
||||
|
||||
void
|
||||
DBMgr::RmPlayers( const char* connName, int nToAdd )
|
||||
{
|
||||
AddPlayers( connName, 0 - nToAdd );
|
||||
}
|
||||
|
||||
void
|
||||
DBMgr::AddCID( const char* const connName, CookieID cid )
|
||||
{
|
||||
|
|
|
@ -42,6 +42,7 @@ class DBMgr {
|
|||
char* connNameBuf, int bufLen );
|
||||
|
||||
void AddPlayers( const char* const connName, int nToAdd );
|
||||
void RmPlayers( const char* const connName, int nToAdd );
|
||||
void AddCID( const char* connName, CookieID cid );
|
||||
void ClearCID( const char* connName );
|
||||
|
||||
|
|
Loading…
Reference in a new issue