Revision: 34783
http://sourceforge.net/p/opalvoip/code/34783
Author: rjongbloed
Date: 2016-04-19 13:25:10 +0000 (Tue, 19 Apr 2016)
Log Message:
-----------
Fixed rare, and relatively trivial, race condition where an RTCP report could go out after a BYE was sent.
Modified Paths:
--------------
opal/trunk/src/rtp/rtp_session.cxx
Modified: opal/trunk/src/rtp/rtp_session.cxx
===================================================================
--- opal/trunk/src/rtp/rtp_session.cxx 2016-04-19 13:23:04 UTC (rev 34782)
+++ opal/trunk/src/rtp/rtp_session.cxx 2016-04-19 13:25:10 UTC (rev 34783)
@@ -2390,17 +2390,19 @@
{
PTRACE(3, *this << "closing RTP.");
+ m_reportTimer.Stop(true);
+ m_endpoint.RegisterLocalRTP(this, true);
+
if (IsOpen() && LockReadOnly()) {
for (SyncSourceMap::iterator it = m_SSRC.begin(); it != m_SSRC.end(); ++it) {
- if (it->second->m_direction == e_Sender && it->second->m_packets > 0)
- it->second->SendBYE();
+ if ( it->second->m_direction == e_Sender &&
+ it->second->m_packets > 0 &&
+ it->second->SendBYE() == e_AbortTransport)
+ break;
}
UnlockReadOnly();
}
- m_reportTimer.Stop(true);
- m_endpoint.RegisterLocalRTP(this, true);
-
return OpalMediaSession::Close();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|