mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
fix assertions around dropped (because ancient) messages
I'm seeing these only when opening games several years old, and they shouldn't matter on release builds. Still....
This commit is contained in:
parent
f8c5a4ea58
commit
f9d3f9fd4e
1 changed files with 3 additions and 2 deletions
|
@ -939,7 +939,9 @@ comms_makeFromStream( MPFORMAL XWEnv xwe, XWStreamCtxt* stream,
|
||||||
msg->checksum = dutil_md5sum( comms->dutil, xwe, msg->smp.buf, len );
|
msg->checksum = dutil_md5sum( comms->dutil, xwe, msg->smp.buf, len );
|
||||||
#endif
|
#endif
|
||||||
XP_ASSERT( NULL == msg->smp.next );
|
XP_ASSERT( NULL == msg->smp.next );
|
||||||
(void)addToQueue( comms, xwe, msg, XP_FALSE );
|
if ( !addToQueue( comms, xwe, msg, XP_FALSE ) ) {
|
||||||
|
--queueLen; /* was dropped */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
XP_ASSERT( queueLen == comms->queueLen );
|
XP_ASSERT( queueLen == comms->queueLen );
|
||||||
|
|
||||||
|
@ -1759,7 +1761,6 @@ addToQueue( CommsCtxt* comms, XWEnv xwe, MsgQueueElem* newElem, XP_Bool notify )
|
||||||
|
|
||||||
MsgQueueElem** head;
|
MsgQueueElem** head;
|
||||||
AddressRecord* rec = getRecordFor( comms, newElem->channelNo );
|
AddressRecord* rec = getRecordFor( comms, newElem->channelNo );
|
||||||
XP_ASSERT( !!rec ); /* I've seen this once on an old game */
|
|
||||||
if ( !rec ) {
|
if ( !rec ) {
|
||||||
freeElem( MPPARM(comms->mpool) newElem );
|
freeElem( MPPARM(comms->mpool) newElem );
|
||||||
asAdded = NULL;
|
asAdded = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue