source/Sources/AirPlayReceiverSession.c
static void	_RetransmitsSchedule( AirPlayReceiverSessionRef inSession, uint16_t inSeqStart, uint16_t inSeqCount )
{
	uint16_t						i;
	AirTunesRetransmitNode **		next;
	AirTunesRetransmitNode *		node;
	uint64_t						nowNanos;
	
	for( next = &inSession->source.rtcpRTBusyList; *next; next = &( *next )->next ) {}
	nowNanos = UpNanoseconds();
	for( i = 0; i < inSeqCount; ++i )
	{
		// Get a free node.
		
		node = inSession->source.rtcpRTFreeList;
		if( !node )
		{
			atr_stats_ulog( kLogLevelWarning, "### No free retransmit nodes, dropping retransmit of seq %u#%u, %u\n", 
				inSeqStart, inSeqCount, i );
			break;
		}
		inSession->source.rtcpRTFreeList = node->next;
		
		// Schedule a retransmit request.
		
		node->next			= NULL;
		node->seq			= inSeqStart + i;
		node->tries			= 0;
		node->startNanos	= nowNanos;
		node->nextNanos		= nowNanos;
		*next = node;
		 next = &node->next;
	}
}
//===========================================================================================================================
//	_RetransmitsSchedule
//
//	Warning: Assumes the AirTunes lock is held.
//===========================================================================================================================
_RetransmitsSchedule
Warning: Assumes the AirTunes lock is held.
_RetransmitsSchedule Warning : Assumes the AirTunes lock is held .
static void	_RetransmitsSchedule( AirPlayReceiverSessionRef inSession, uint16_t inSeqStart, uint16_t inSeqCount )
{
	uint16_t						i;
	AirTunesRetransmitNode **		next;
	AirTunesRetransmitNode *		node;
	uint64_t						nowNanos;
	for( next = &inSession->source.rtcpRTBusyList; *next; next = &( *next )->next ) {}
	nowNanos = UpNanoseconds();
	for( i = 0; i < inSeqCount; ++i )
	{
		node = inSession->source.rtcpRTFreeList;
		if( !node )
		{
			atr_stats_ulog( kLogLevelWarning, "### No free retransmit nodes, dropping retransmit of seq %u#%u, %u\n", 
				inSeqStart, inSeqCount, i );
			break;
		}
		inSession->source.rtcpRTFreeList = node->next;
		node->next			= NULL;
		node->seq			= inSeqStart + i;
		node->tries			= 0;
		node->startNanos	= nowNanos;
		node->nextNanos		= nowNanos;
		*next = node;
		 next = &node->next;
	}
}
static void _RetransmitsSchedule ( AirPlayReceiverSessionRef inSession , uint16_t inSeqStart , uint16_t inSeqCount ) { uint16_t i ; AirTunesRetransmitNode * * next ; AirTunesRetransmitNode * node ; uint64_t nowNanos ; for ( next = & inSession -> source . rtcpRTBusyList ; * next ; next = & ( * next ) -> next ) { } nowNanos = UpNanoseconds ( ) ; for ( i = 0 ; i < inSeqCount ; ++ i ) { node = inSession -> source . rtcpRTFreeList ; if ( ! node ) { atr_stats_ulog ( kLogLevelWarning , " \n " , inSeqStart , inSeqCount , i ) ; break ; } inSession -> source . rtcpRTFreeList = node -> next ; node -> next = NULL ; node -> seq = inSeqStart + i ; node -> tries = 0 ; node -> startNanos = nowNanos ; node -> nextNanos = nowNanos ; * next = node ; next = & node -> next ; } }
_RetransmitsSchedule
Warning: Assumes the AirTunes lock is held.
_RetransmitsSchedule Warning : Assumes the AirTunes lock is held .
// Get a free node. // Schedule a retransmit request.