From e746e2bc5b8eb8ef439eb3728d0bfd7b28d822de Mon Sep 17 00:00:00 2001 From: ehouse Date: Fri, 31 Jul 2009 13:03:38 +0000 Subject: [PATCH] Fix assertion failures --- xwords4/common/server.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/xwords4/common/server.c b/xwords4/common/server.c index e96afd50b..a4325910c 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -1029,7 +1029,6 @@ client_readInitialMessage( ServerCtxt* server, XWStreamCtxt* stream ) /* We should never get this message a second time, but very rarely we do. Drop it in that case. */ - XP_ASSERT( accepted ); if ( accepted ) { DictionaryCtxt* newDict; DictionaryCtxt* curDict; @@ -1106,8 +1105,8 @@ client_readInitialMessage( ServerCtxt* server, XWStreamCtxt* stream ) pool = server->pool = pool_make( MPPARM_NOCOMMA(server->mpool) ); pool_initFromDict( server->pool, model_getDictionary(model)); - /* now read the assigned tiles for each player from the stream, and remove - them from the newly-created local pool. */ + /* now read the assigned tiles for each player from the stream, and + remove them from the newly-created local pool. */ for ( i = 0; i < nPlayers; ++i ) { TrayTileSet tiles; @@ -1118,7 +1117,8 @@ client_readInitialMessage( ServerCtxt* server, XWStreamCtxt* stream ) model_assignPlayerTiles( model, i, &tiles ); - /* remove what the server's assigned so we won't conflict later. */ + /* remove what the server's assigned so we won't conflict + later. */ pool_removeTiles( pool, &tiles ); } @@ -1128,7 +1128,8 @@ client_readInitialMessage( ServerCtxt* server, XWStreamCtxt* stream ) players */ setTurn( server, 0 ); } else { - XP_LOGF( "wanted 0; got %d", server->nv.addresses[0].channelNo ); + XP_LOGF( "%s: wanted 0; got %d", __func__, + server->nv.addresses[0].channelNo ); } return accepted; } /* client_readInitialMessage */