mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
assert that we aren't tracking two connected games with the same hid
This commit is contained in:
parent
27d9f3de45
commit
32150049e2
1 changed files with 5 additions and 1 deletions
|
@ -1441,16 +1441,20 @@ CookieRef::printSeeds( const char* caller )
|
|||
{
|
||||
int len = 0;
|
||||
char buf[64] = {0};
|
||||
uint16_t bits = 0;
|
||||
|
||||
RWReadLock rrl( &m_socketsRWLock );
|
||||
vector<HostRec>::const_iterator iter;
|
||||
for ( iter = m_sockets.begin(); iter != m_sockets.end(); ++iter ) {
|
||||
HostID hostID = iter->m_hostID;
|
||||
assert( 0 == (bits & (1 << hostID)) );
|
||||
bits |= 1 << hostID;
|
||||
len += snprintf( &buf[len], sizeof(buf)-len, "[%d]%.4x(%d)/%d/%c ",
|
||||
iter->m_hostID, iter->m_seed,
|
||||
iter->m_seed, iter->m_addr.socket(),
|
||||
iter->m_ackPending?'a':'A' );
|
||||
}
|
||||
logf( XW_LOGINFO, "seeds/sockets/ack'd after %s(): %s", caller, buf );
|
||||
logf( XW_LOGINFO, "%s: seeds/sockets/ack'd after %s(): %s", __func__, caller, buf );
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue