private void AddOrUpdateParticipant(uint ssrc, SdesData sdes, IPAddress ip)
{
lock(participants)
{
string cName = sdes.CName;
RtpParticipant participant = null;
if (participants.ContainsKey(cName))
participant = participants[cName];
// Participant does not exist
if(null == participant)
{
// Create a new participant
AddParticipant(ssrc, new RtpParticipant(sdes, ip));
}
else // Participant exists
{
CheckForCNameConflict(cName, new IPAddress[]{participant.IPAddress, ip});
participant.Stale = 0;
participant.UpdateData(sdes);
}
}
}