add assert, and don't pass pendingRegistrations to clients -- it confuses them

This commit is contained in:
Eric House 2014-09-24 19:33:59 -07:00
parent 743d532fc7
commit 1e80109c3e

View file

@ -416,9 +416,9 @@ server_makeFromStream( MPFORMAL XWStreamCtxt* stream, ModelCtxt* model,
server->nv.prevWordsStream = readStreamIf( server, stream ); server->nv.prevWordsStream = readStreamIf( server, stream );
} }
util_informMissing( util, server->vol.gi->serverRole == SERVER_ISSERVER, XP_Bool isServer = amServer( server );
comms_getConType( comms ), util_informMissing( util, isServer, comms_getConType( comms ),
server->nv.pendingRegistrations ); isServer ? server->nv.pendingRegistrations : 0 );
return server; return server;
} /* server_makeFromStream */ } /* server_makeFromStream */
@ -2551,6 +2551,8 @@ tileCountsOk( const ServerCtxt* server )
static void static void
setTurn( ServerCtxt* server, XP_S16 turn ) setTurn( ServerCtxt* server, XP_S16 turn )
{ {
XP_ASSERT( -1 == turn
|| (!amServer(server) || (0 == server->nv.pendingRegistrations)));
if ( server->nv.currentTurn != turn ) { if ( server->nv.currentTurn != turn ) {
server->nv.currentTurn = turn; server->nv.currentTurn = turn;
server->nv.lastMoveTime = util_getCurSeconds( server->vol.util ); server->nv.lastMoveTime = util_getCurSeconds( server->vol.util );