[Opalvoip-svn] SF.net SVN: opalvoip:[32501] opal/trunk/src/rtp/rtp_session.cxx
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2014-08-12 05:18:19
|
Revision: 32501 http://sourceforge.net/p/opalvoip/code/32501 Author: rjongbloed Date: 2014-08-12 05:18:10 +0000 (Tue, 12 Aug 2014) Log Message: ----------- Improved logging Modified Paths: -------------- opal/trunk/src/rtp/rtp_session.cxx Modified: opal/trunk/src/rtp/rtp_session.cxx =================================================================== --- opal/trunk/src/rtp/rtp_session.cxx 2014-08-12 05:09:24 UTC (rev 32500) +++ opal/trunk/src/rtp/rtp_session.cxx 2014-08-12 05:18:10 UTC (rev 32501) @@ -242,20 +242,23 @@ bool OpalRTPSession::GetSyncSource(RTP_SyncSourceId ssrc, Direction dir, SyncSource * & info) const { SyncSourceMap::const_iterator it; - if (ssrc != 0) - it = m_SSRC.find(ssrc); + if (ssrc != 0) { + if ((it = m_SSRC.find(ssrc)) == m_SSRC.end()) { + PTRACE(3, *this << "cannot find info for " << dir << " SSRC=" << RTP_TRACE_SRC(ssrc)); + return false; + } + } else { for (it = m_SSRC.begin(); it != m_SSRC.end(); ++it) { if (it->second->m_direction == dir) break; } + if (it == m_SSRC.end()) { + PTRACE(3, *this << "cannot find info for any " << dir); + return false; + } } - if (it == m_SSRC.end()) { - PTRACE(3, *this << "cannot find data for " << dir << " SSRC=" << RTP_TRACE_SRC(ssrc)); - return false; - } - info = const_cast<SyncSource *>(it->second); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |