diff options
author | Henri Herscher <henri@oreka.org> | 2005-10-31 19:42:26 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2005-10-31 19:42:26 +0000 |
commit | ad54c92028787c13d0930fa6124b9db7a37134c0 (patch) | |
tree | f050b2a7cc217dcd0a2e24b9d7362736293fba1b /orkaudio/audiocaptureplugins/voip/RtpSession.cpp | |
parent | f0b8dfe5fe22576adc48c5ec414bb40cf38d0cb5 (diff) |
Groundwork for adding skinny support
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@24 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r-- | orkaudio/audiocaptureplugins/voip/RtpSession.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp index 1239055..c8b49dd 100644 --- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp +++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp @@ -289,10 +289,10 @@ RtpSessions::RtpSessions() void RtpSessions::ReportSipInvite(SipInviteInfoRef& invite) { - CStdString key = CStdString(ACE_OS::inet_ntoa(invite->m_fromIp)) + "," + invite->m_fromRtpPort; + CStdString ipAndPort = CStdString(ACE_OS::inet_ntoa(invite->m_fromIp)) + "," + invite->m_fromRtpPort; std::map<CStdString, RtpSessionRef>::iterator pair; - pair = m_byIpAndPort.find(key); + pair = m_byIpAndPort.find(ipAndPort); if (pair != m_byIpAndPort.end()) { @@ -302,11 +302,12 @@ void RtpSessions::ReportSipInvite(SipInviteInfoRef& invite) } // create new session and insert into both maps RtpSessionRef session(new RtpSession()); - session->m_ipAndPort = key; + session->m_ipAndPort = ipAndPort; + session->m_callId = invite->m_callId; session->m_protocol = RtpSession::ProtSip; session->ReportSipInvite(invite); - m_byCallId.insert(std::make_pair(invite->m_callId, session)); - m_byIpAndPort.insert(std::make_pair(key, session)); + m_byIpAndPort.insert(std::make_pair(session->m_ipAndPort, session)); + m_byCallId.insert(std::make_pair(session->m_callId, session)); } void RtpSessions::ReportSipBye(SipByeInfo bye) @@ -325,10 +326,13 @@ void RtpSessions::ReportSipBye(SipByeInfo bye) void RtpSessions::Stop(RtpSessionRef& session) { session->Stop(); - m_byIpAndPort.erase(session->m_ipAndPort); - if(session->m_invite.get() != NULL) + if(session->m_ipAndPort.size() > 0) + { + m_byIpAndPort.erase(session->m_ipAndPort); + } + if(session->m_callId.size() > 0) { - m_byCallId.erase(session->m_invite->m_callId); + m_byCallId.erase(session->m_callId); } } |