NewTOAPIA.Net.Rtp.RtpSession.RemoveSSRC C# (CSharp) Method

RemoveSSRC() private method

This method is one extra layer of checks to make sure someone isn't messing with us (trying to remove streams they don't own by sending BYE packets for instance) If we know the IPAddress of the request to RemoveStream, make sure it is the same IPAddress that owns the stream
private RemoveSSRC ( uint ssrc, IPAddress ip ) : void
ssrc uint
ip IPAddress
return void
        private void RemoveSSRC(uint ssrc, IPAddress ip)
        {
            lock(streamsAndIPs)
            {
                // TODO - perhaps this should just be an SSRCConflict check (or it has already been done) JVE
                if(streamsAndIPs.ContainsKey(ssrc))
                {
                    if(!ip.Equals(streamsAndIPs[ssrc].senderIP))
                    {
                        //eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, 
                        //    Strings.IPAddressTryingToRemoveString, ip.ToString(), ssrc, 
                        //    streamsAndIPs[ssrc].senderIP.ToString()), EventLogEntryType.Error, 
                        //    (int)RtpEL.ID.RemoveStreamAttack);

                        return;  // Don't actually remove the stream
                    }
                }
            }

            RemoveSSRC(ssrc);
        }

Same methods

RtpSession::RemoveSSRC ( uint ssrc ) : void