return succes from server_initClientConnection()

This commit is contained in:
Eric House 2014-09-14 13:41:33 -07:00
parent 4d2f49d33f
commit 7d8b9b4270

View file

@ -551,9 +551,10 @@ server_countTilesInPool( ServerCtxt* server )
#define NAME_LEN_NBITS 6 #define NAME_LEN_NBITS 6
#define MAX_NAME_LEN ((1<<(NAME_LEN_NBITS-1))-1) #define MAX_NAME_LEN ((1<<(NAME_LEN_NBITS-1))-1)
#ifndef XWFEATURE_STANDALONE_ONLY #ifndef XWFEATURE_STANDALONE_ONLY
void XP_Bool
server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream ) server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
{ {
XP_Bool result;
LOG_FUNC(); LOG_FUNC();
CurGameInfo* gi = server->vol.gi; CurGameInfo* gi = server->vol.gi;
XP_U16 nPlayers; XP_U16 nPlayers;
@ -564,7 +565,8 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
XP_ASSERT( gi->serverRole == SERVER_ISCLIENT ); XP_ASSERT( gi->serverRole == SERVER_ISCLIENT );
XP_ASSERT( stream != NULL ); XP_ASSERT( stream != NULL );
if ( server->nv.gameState == XWSTATE_NONE ) { result = server->nv.gameState == XWSTATE_NONE;
if ( result ) {
stream_open( stream ); stream_open( stream );
writeProto( server, stream, XWPROTO_DEVICE_REGISTRATION ); writeProto( server, stream, XWPROTO_DEVICE_REGISTRATION );
@ -598,12 +600,12 @@ server_initClientConnection( ServerCtxt* server, XWStreamCtxt* stream )
#ifdef STREAM_VERS_BIGBOARD #ifdef STREAM_VERS_BIGBOARD
stream_putU8( stream, CUR_STREAM_VERS ); stream_putU8( stream, CUR_STREAM_VERS );
#endif #endif
} else { } else {
XP_LOGF( "%s: wierd state %s; dropping message", __func__, XP_LOGF( "%s: wierd state %s; dropping message", __func__,
getStateStr(server->nv.gameState) ); getStateStr(server->nv.gameState) );
} }
stream_destroy( stream ); stream_destroy( stream );
return result;
} /* server_initClientConnection */ } /* server_initClientConnection */
#endif #endif