From b0a4790ce051399b4f6225a4fb690c9366a88647 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Thu, 11 Nov 2010 06:41:24 -0800 Subject: [PATCH] respond to new game-gone message by passing to utils. --- xwords4/common/comms.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index db9bc2ab2..0dbaa0272 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -1154,6 +1154,7 @@ relayCmdToStr( XWRELAY_Cmd cmd ) #endif CASESTR( XWRELAY_MSG_FROMRELAY ); CASESTR( XWRELAY_MSG_TORELAY ); + CASESTR( XWRELAY_MSG_STATUS ); default: XP_LOGF( "%s: unknown cmd: %d", __func__, cmd ); XP_ASSERT( 0 ); @@ -1316,6 +1317,11 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID ) util_userError( comms->util, ERR_RELAY_BASE + relayErr ); break; + case XWRELAY_MSG_STATUS: + relayErr = stream_getU8( stream ); + (*comms->procs.rerror)( comms->procs.closure, relayErr ); + break; + case XWRELAY_CONNECTDENIED: /* socket will get closed by relay */ relayErr = stream_getU8( stream ); set_relay_state( comms, COMMS_RELAYSTATE_DENIED );