From 23b72467bb7b69f3c0f9fa3afd41a4051e8be2cb Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 8 Mar 2014 12:47:58 -0800 Subject: [PATCH] don't assert unset cookieID, as that's normal (I think) for unconnected case --- xwords4/common/comms.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index a882a891d..aa115dc94 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -1495,7 +1495,7 @@ relayPreProcess( CommsCtxt* comms, XWStreamCtxt* stream, XWHostID* senderID ) comms->rr.myHostID, srcID ); } - if ( 0 == comms->rr.cookieID ) { + if ( COOKIE_ID_NONE == comms->rr.cookieID ) { XP_LOGF( "%s: cookieID still 0; background send?", __func__ ); } @@ -2266,7 +2266,10 @@ msg_to_stream( CommsCtxt* comms, XWRELAY_Cmd cmd, XWHostID destID, switch ( cmd ) { case XWRELAY_MSG_TORELAY: - XP_ASSERT( COOKIE_ID_NONE != comms->rr.cookieID ); + if ( COOKIE_ID_NONE == comms->rr.cookieID ) { + XP_LOGF( "%s: cookieID still 0; background send?", + __func__ ); + } stream_putU16( stream, comms->rr.cookieID ); case XWRELAY_MSG_TORELAY_NOCONN: stream_putU8( stream, comms->rr.myHostID );