debug build asserts that packet is meant for this device, but

non-debug should drop those that aren't.
This commit is contained in:
Eric House 2013-07-29 07:30:46 -07:00
parent 1f877c7567
commit 63ad3a196b

View file

@ -1770,8 +1770,12 @@ cursesGotBuf( void* closure, const XP_U8* buf, XP_U16 len )
XP_U16 seed;
rowidFromToken( XP_NTOHL( clientToken ), &ignore, &seed );
XP_ASSERT( seed == comms_getChannelSeed( globals->cGlobals.game.comms ) );
gameGotBuf( &globals->cGlobals, XP_TRUE, buf, len );
if ( seed == comms_getChannelSeed( globals->cGlobals.game.comms ) ) {
gameGotBuf( &globals->cGlobals, XP_TRUE, buf, len );
} else {
XP_LOGF( "%s: dropping packet; meant for a different device",
__func__ );
}
}
static gint