mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
HACK: server must ping relay or it can't be contacted
This commit is contained in:
parent
2e9dd5f3ea
commit
71870695cc
1 changed files with 14 additions and 0 deletions
|
@ -750,6 +750,19 @@ showPrevScore( ServerCtxt* server )
|
|||
SETSTATE( server, server->vol.stateAfterShow );
|
||||
} /* showPrevScore */
|
||||
|
||||
#if! defined XWFEATURE_STANDALONE_ONLY && defined BEYOND_IR
|
||||
static void
|
||||
connectRelay( ServerCtxt* server )
|
||||
{
|
||||
XWStreamCtxt* stream = util_makeStreamFromAddr( server->vol.util,
|
||||
CHANNEL_NONE );
|
||||
stream_putBytes( stream, &stream, 1 );
|
||||
stream_close( stream );
|
||||
}
|
||||
#else
|
||||
# define connectRelay(s)
|
||||
#endif
|
||||
|
||||
XP_Bool
|
||||
server_do( ServerCtxt* server )
|
||||
{
|
||||
|
@ -763,6 +776,7 @@ server_do( ServerCtxt* server )
|
|||
|
||||
switch( server->nv.gameState ) {
|
||||
case XWSTATE_BEGIN:
|
||||
connectRelay( server );
|
||||
if ( server->nv.pendingRegistrations == 0 ) { /* all players on device */
|
||||
assignTilesToAll( server );
|
||||
SETSTATE( server, XWSTATE_INTURN );
|
||||
|
|
Loading…
Reference in a new issue