drop-packet test got an assert because we assumed the effects of a

dropped packet.  Instead, now treat the connection as broken and
restart.
This commit is contained in:
Andy2 2011-06-27 18:30:52 -07:00
parent e122953fd5
commit a96dfb57f6

View file

@ -1268,7 +1268,14 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID )
srcID = (XWHostID)stream_getU8( stream );
XP_ASSERT( comms->r.myHostID == HOST_ID_NONE
|| comms->r.myHostID == srcID );
if ( 0 == comms->r.cookieID ) {
XP_LOGF( "%s: cookieID still 0; most likely packet was lost",
__func__ );
comms_transportFailed( comms );
} else {
comms->r.myHostID = srcID;
XP_LOGF( "%s: set hostid: %x", __func__, comms->r.myHostID );
#ifdef DEBUG
@ -1299,6 +1306,7 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID )
comms->r.myHostID, XP_TRUE, 0 );
}
set_relay_state( comms, COMMS_RELAYSTATE_ALLCONNECTED );
}
break;
case XWRELAY_MSG_FROMRELAY:
cookieID = stream_getU16( stream );