add logging

This commit is contained in:
Eric House 2023-01-23 13:42:38 -08:00
parent 873501f8da
commit 7fdf43eba6
2 changed files with 7 additions and 1 deletions

View file

@ -492,7 +492,9 @@ comms_make( MPFORMAL XWEnv xwe, XW_UtilCtxt* util, XP_Bool isServer,
if ( !!selfAddr ) { if ( !!selfAddr ) {
ASSERT_ADDR_OK(selfAddr); ASSERT_ADDR_OK(selfAddr);
logAddr( comms, xwe, &comms->selfAddr, "before selfAddr" );
comms->selfAddr = *selfAddr; comms->selfAddr = *selfAddr;
logAddr( comms, xwe, &comms->selfAddr, "after selfAddr" );
} }
if ( !!hostAddr ) { if ( !!hostAddr ) {
XP_ASSERT( !isServer ); XP_ASSERT( !isServer );
@ -1907,7 +1909,10 @@ sendMsg( const CommsCtxt* comms, XWEnv xwe, MsgQueueElem* elem,
XP_LOGFF( "dropping message because not of type %s", XP_LOGFF( "dropping message because not of type %s",
ConnType2Str( filter ) ); ConnType2Str( filter ) );
} else { } else {
XP_ASSERT( addr_hasType( &comms->selfAddr, typ ) ); if ( !isInvite && !addr_hasType( &comms->selfAddr, typ ) ) {
XP_LOGFF( "self addr doesn't have msg type %s", ConnType2Str(typ) );
XP_ASSERT( 0 );
}
#ifdef COMMS_CHECKSUM #ifdef COMMS_CHECKSUM
XP_LOGFF( TAGFMT() "sending msg with sum %s using typ %s", TAGPRMS, XP_LOGFF( TAGFMT() "sending msg with sum %s using typ %s", TAGPRMS,
elem->checksum, ConnType2Str(typ) ); elem->checksum, ConnType2Str(typ) );

View file

@ -501,6 +501,7 @@ game_receiveMessage( XWGame* game, XWEnv xwe, XWStreamCtxt* stream,
runServer( server, xwe ); runServer( server, xwe );
} }
LOG_RETURNF( "%s", boolToStr(result) );
return result; return result;
} }