mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
remove gross connectRelay hack. There's now a wrapping protocol that
talks to the relay entirely inside comms.c.
This commit is contained in:
parent
7d84a2654f
commit
4d454a8fff
1 changed files with 0 additions and 21 deletions
|
@ -82,7 +82,6 @@ typedef struct ServerVolatiles {
|
|||
someone quits before I can show the
|
||||
scores? PENDING(ehouse) */
|
||||
XP_Bool showPrevMove;
|
||||
XP_Bool connected; /* already pinged the relay? */
|
||||
} ServerVolatiles;
|
||||
|
||||
typedef struct ServerNonvolatiles {
|
||||
|
@ -206,7 +205,6 @@ initServer( ServerCtxt* server )
|
|||
}
|
||||
|
||||
server->nv.nDevices = 1; /* local device (0) is always there */
|
||||
server->vol.connected = XP_FALSE;
|
||||
} /* initServer */
|
||||
|
||||
ServerCtxt*
|
||||
|
@ -752,24 +750,6 @@ showPrevScore( ServerCtxt* server )
|
|||
SETSTATE( server, server->vol.stateAfterShow );
|
||||
} /* showPrevScore */
|
||||
|
||||
#if! defined XWFEATURE_STANDALONE_ONLY && defined BEYOND_IR
|
||||
static void
|
||||
connectRelay( ServerCtxt* server )
|
||||
{
|
||||
/* THIS is a gross HACK. Relay-specific stuff belongs in comms.c as an
|
||||
additional protocol layer. PENDING(ehouse) */
|
||||
if ( !server->vol.connected ) {
|
||||
XWStreamCtxt* stream = util_makeStreamFromAddr( server->vol.util,
|
||||
CHANNEL_NONE );
|
||||
stream_putBytes( stream, &stream, 1 );
|
||||
stream_close( stream );
|
||||
server->vol.connected = XP_TRUE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define connectRelay(s)
|
||||
#endif
|
||||
|
||||
XP_Bool
|
||||
server_do( ServerCtxt* server )
|
||||
{
|
||||
|
@ -783,7 +763,6 @@ 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