From 71870695cc17327fc6047081448dce85df1fab50 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 6 Mar 2005 17:51:18 +0000 Subject: [PATCH] HACK: server must ping relay or it can't be contacted --- xwords4/common/server.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xwords4/common/server.c b/xwords4/common/server.c index cc15779b6..fb45a9496 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -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 );