replace assert fail with message rejection

Some relay bug (I think) misroutes or duplicates packets. Don't assert
as that means test scripts fail to finish. Instead drop the
message. Scripts seem to recover ok with this change and I've never seen
the assert on a device so suspect it's test-world only
This commit is contained in:
Eric House 2020-08-22 20:34:43 -07:00
parent 97e7a4de69
commit bd53824d95

View file

@ -3886,13 +3886,12 @@ handleIllegalWord( ServerCtxt* server, XWEnv xwe, XWStreamCtxt* incoming )
static XP_Bool
handleMoveOk( ServerCtxt* server, XWEnv xwe, XWStreamCtxt* XP_UNUSED(incoming) )
{
XP_Bool accepted = XP_TRUE;
XP_ASSERT( server->vol.gi->serverRole == SERVER_ISCLIENT );
XP_ASSERT( server->nv.gameState == XWSTATE_MOVE_CONFIRM_WAIT );
SETSTATE( server, XWSTATE_INTURN );
nextTurn( server, xwe, PICK_CUR );
XP_Bool accepted = server->nv.gameState == XWSTATE_MOVE_CONFIRM_WAIT;
if ( accepted ) {
SETSTATE( server, XWSTATE_INTURN );
nextTurn( server, xwe, PICK_CUR );
}
return accepted;
} /* handleMoveOk */