diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index cd39c5cd7..1f020c118 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -2327,6 +2327,14 @@ addr_addType( CommsAddrRec* addr, CommsConnType type ) addr->_conTypes |= 1 << (type - 1); } +void +addr_rmType( CommsAddrRec* addr, CommsConnType type ) +{ + XP_ASSERT( COMMS_CONN_NONE != type ); + XP_LOGF( "%s(%s)", __func__, ConnType2Str(type) ); + addr->_conTypes &= ~(1 << (type - 1)); +} + /* Set of NONE is ok, but for anything else it's illegal to be adding a second bit. Use addr_addType() for that. */ void diff --git a/xwords4/common/comms.h b/xwords4/common/comms.h index e3186bf01..594d0e430 100644 --- a/xwords4/common/comms.h +++ b/xwords4/common/comms.h @@ -227,6 +227,7 @@ XP_Bool comms_isConnected( const CommsCtxt* const comms ); CommsConnType addr_getType( const CommsAddrRec* addr ); void addr_setType( CommsAddrRec* addr, CommsConnType type ); void addr_addType( CommsAddrRec* addr, CommsConnType type ); +void addr_rmType( CommsAddrRec* addr, CommsConnType type ); XP_Bool addr_hasType( const CommsAddrRec* addr, CommsConnType type ); XP_Bool addr_iter( const CommsAddrRec* addr, CommsConnType* typp, XP_U32* state );