respond to new game-gone message by passing to utils.

This commit is contained in:
Andy2 2010-11-11 06:41:24 -08:00
parent 0787a06eb5
commit b0a4790ce0

View file

@ -1154,6 +1154,7 @@ relayCmdToStr( XWRELAY_Cmd cmd )
#endif #endif
CASESTR( XWRELAY_MSG_FROMRELAY ); CASESTR( XWRELAY_MSG_FROMRELAY );
CASESTR( XWRELAY_MSG_TORELAY ); CASESTR( XWRELAY_MSG_TORELAY );
CASESTR( XWRELAY_MSG_STATUS );
default: default:
XP_LOGF( "%s: unknown cmd: %d", __func__, cmd ); XP_LOGF( "%s: unknown cmd: %d", __func__, cmd );
XP_ASSERT( 0 ); XP_ASSERT( 0 );
@ -1316,6 +1317,11 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID )
util_userError( comms->util, ERR_RELAY_BASE + relayErr ); util_userError( comms->util, ERR_RELAY_BASE + relayErr );
break; 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 */ case XWRELAY_CONNECTDENIED: /* socket will get closed by relay */
relayErr = stream_getU8( stream ); relayErr = stream_getU8( stream );
set_relay_state( comms, COMMS_RELAYSTATE_DENIED ); set_relay_state( comms, COMMS_RELAYSTATE_DENIED );