fix broken assertion and add missing state transitions to fix crashes.

This commit is contained in:
Andy2 2010-09-16 05:39:25 -07:00
parent 2b702b48d6
commit 25c1824c45
2 changed files with 7 additions and 6 deletions

View file

@ -591,7 +591,7 @@ CookieRef::handleEvents()
sendResponse( &evt, false );
sendAnyStored( &evt );
increasePlayerCounts( &evt, true );
// postCheckAllHere();
postCheckAllHere();
break;
case XWA_SEND_NO_ROOM:
@ -1216,7 +1216,6 @@ CookieRef::_CheckNotAcked()
{
logf( XW_LOGINFO, "%s", __func__ );
if ( m_nPendingAcks > 0 ) {
assert( m_curState == XWS_WAITING_ACKS );
CRefEvent newEvt( XWE_ACKTIMEOUT );
m_eventQueue.push_back( newEvt );
handleEvents();

View file

@ -67,9 +67,11 @@ static StateTable g_stateTable[] = {
{ XWS_WAITMORE, XWE_ACKTIMEOUT, XWA_DROPDEVICE, XWS_WAITMORE },
{ XWS_WAITMORE, XWE_ALLHERE, XWA_SENDALLHERE, XWS_ALLCONND },
{ XWS_WAITMORE, XWE_RECONNECT, XWA_SEND_RERSP, XWS_WAITMORE },
{ XWS_WAITMORE, XWE_FORWARDMSG, XWA_FWD, XWS_WAITMORE },
/* { XWS_WAITMORE, XWE_RECONNECT, XWA_SEND_RERSP, XWS_WAITMORE }, */
/* { XWS_ALLCONND, XWE_RECONNECT, XWA_SEND_RERSP, XWS_ALLCONND }, */
{ XWS_ALLCONND, XWE_RECONNECT, XWA_SEND_RERSP, XWS_ALLCONND },
{ XWS_ALLCONND, XWE_ALLHERE, XWA_NONE, XWS_ALLCONND },
/* { XWS_WAITMORE, XWE_GAMEFULL, XWA_SENDALLHERE, XWS_ALLCONND }, */
/* { XWS_WAITMORE, XWE_CHECKFULL, XWA_, XWS_WAITMORE }, */
@ -105,8 +107,8 @@ static StateTable g_stateTable[] = {
/* This doesn't make sense. Can't go straight to ALLCOND if don't have all
players/devices. */
{ XWS_INITED, XWE_RECONNECT, XWA_SEND_RERSP, XWS_ALLCONND },
{ XWS_MSGONLY, XWE_RECONNECT, XWA_SEND_RERSP, XWS_ALLCONND },
{ XWS_INITED, XWE_RECONNECT, XWA_SEND_RERSP, XWS_WAITMORE },
{ XWS_MSGONLY, XWE_RECONNECT, XWA_SEND_RERSP, XWS_WAITMORE },
{ XWS_MISSING, XWE_RECONNECT, XWA_SEND_RERSP, XWS_CHK_ALLHERE_2 },
{ XWS_CHK_ALLHERE_2, XWE_ALLHERE, XWA_SNDALLHERE_2, XWS_ALLCONND },