mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
fix channel comparison so messages actually get deleted after they're
ack'd.
This commit is contained in:
parent
acf5a01374
commit
88dd25fb21
1 changed files with 4 additions and 2 deletions
|
@ -1260,6 +1260,7 @@ removeFromQueue( CommsCtxt* comms, XP_PlayerAddr channelNo, MsgID msgID )
|
|||
comms->msgQueueHead = comms->msgQueueTail = NULL;
|
||||
comms->queueLen = 0;
|
||||
|
||||
XP_PlayerAddr maskedChannelNo = ~CHANNEL_MASK & channelNo;
|
||||
for ( ; !!elem; elem = next ) {
|
||||
XP_Bool knownGood = XP_FALSE;
|
||||
next = elem->next;
|
||||
|
@ -1269,10 +1270,11 @@ removeFromQueue( CommsCtxt* comms, XP_PlayerAddr channelNo, MsgID msgID )
|
|||
queue, and receiving something from the server is an implicit
|
||||
ACK -- IFF it isn't left over from the last game. */
|
||||
|
||||
if ( ((CHANNEL_MASK & elem->channelNo) == 0) && (channelNo!= 0) ) {
|
||||
XP_PlayerAddr maskedElemChannelNo = ~CHANNEL_MASK & elem->channelNo;
|
||||
if ( (maskedElemChannelNo == 0) && (channelNo != 0) ) {
|
||||
XP_ASSERT( !comms->isServer );
|
||||
XP_ASSERT( elem->msgID == 0 );
|
||||
} else if ( elem->channelNo != channelNo ) {
|
||||
} else if ( maskedElemChannelNo != maskedChannelNo ) {
|
||||
knownGood = XP_TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue