mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-07 05:24:46 +01:00
drop messages using comms methods (e.g. SMS) for which comms hasn't
been set up. Fixes assertion firing when SMS messages go to wrong app (normal vs CrossDbg), though the right fix is to have the two apps using different ports so they don't get each other's messages.
This commit is contained in:
parent
6c863155ef
commit
0a95bc0f42
1 changed files with 4 additions and 2 deletions
|
@ -2138,12 +2138,14 @@ comms_checkIncomingStream( CommsCtxt* comms, XWStreamCtxt* stream,
|
|||
if ( comms_getAddrDisabled( comms, addr_getType(retAddr), XP_FALSE ) ) {
|
||||
XP_LOGF( "%s: dropping message because %s disabled", __func__,
|
||||
ConnType2Str( addr_getType( retAddr ) ) );
|
||||
} else if (0 == (comms->addr._conTypes & retAddr->_conTypes)) {
|
||||
/* we don't expect messages with that address type; drop it */
|
||||
XP_LOGF( "%s: not expecting %s messages", __func__,
|
||||
ConnType2Str( addr_getType( retAddr ) ) );
|
||||
} else {
|
||||
XWHostID senderID = 0; /* unset; default for non-relay cases */
|
||||
XP_Bool usingRelay = XP_FALSE;
|
||||
|
||||
XP_ASSERT( retAddr == NULL ||
|
||||
(0 != (comms->addr._conTypes & retAddr->_conTypes)) );
|
||||
#ifdef COMMS_CHECKSUM
|
||||
XP_U16 initialLen = stream_getSize( stream );
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue