return COMMS_CONN_NONE as address type of null comms rather than asserting.

This commit is contained in:
Eric House 2012-02-14 16:54:19 -08:00
parent 45f2134ab5
commit 914fa857be

View file

@ -858,8 +858,11 @@ comms_checkAddr( DeviceRole role, const CommsAddrRec* addr, XW_UtilCtxt* util )
CommsConnType
comms_getConType( const CommsCtxt* comms )
{
XP_ASSERT( !!comms ); /* or: return COMMS_CONN_NONE */
return comms->addr.conType;
CommsConnType typ = !!comms ? comms->addr.conType : COMMS_CONN_NONE;
if ( !comms ) {
XP_LOGF( "%s: returning COMMS_CONN_NONE for null comms", __func__ );
}
return typ;
} /* comms_getConType */
XP_Bool