<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: 1341a75ad899d35f9003e4514cb5c8f724e0e7da (commit)
from: 04bb74fcaeb72683754ed4b4d6df197a898887b7 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Anthony Minessale
comments:
fix race with media bug exiting from write frame while read frame is trying to use it
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_core_io.c b/src/switch_core_io.c</span>
<span style="color: #000080; font-weight: bold">index decb587..4e1c707 100644</span>
<span style="color: #A00000">--- a/src/switch_core_io.c</span>
<span style="color: #00A000">+++ b/src/switch_core_io.c</span>
<span style="color: #800080; font-weight: bold">@@ -318,11 +318,24 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi</span>
                                switch_codec_t *use_codec = read_frame->codec;
                                if (do_bugs) {
                                        switch_thread_rwlock_wrlock(session->bug_rwlock);
<span style="color: #00A000">+                                        if (!session->bugs) {</span>
<span style="color: #00A000">+                                                do_bugs = 0;</span>
<span style="color: #00A000">+                                                switch_thread_rwlock_unlock(session->bug_rwlock);</span>
<span style="color: #00A000">+                                                goto done;</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+</span>
                                        if (!switch_core_codec_ready(&session->bug_codec)) {
                                                switch_core_codec_copy(read_frame->codec, &session->bug_codec, NULL);
                                        }
                                        use_codec = &session->bug_codec;
                                        switch_thread_rwlock_unlock(session->bug_rwlock);
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        switch_thread_rwlock_wrlock(session->bug_rwlock);</span>
<span style="color: #00A000">+                                        if (!session->bugs) {</span>
<span style="color: #00A000">+                                                do_bugs = 0;</span>
<span style="color: #00A000">+                                        }</span>
<span style="color: #00A000">+                                        switch_thread_rwlock_unlock(session->bug_rwlock);</span>
<span style="color: #00A000">+                                        if (!do_bugs) goto done;</span>
                                }
                                if (switch_test_flag(read_frame, SFF_PLC)) {
</pre></div>
========================================================================<pre>
Summary of changes:
src/switch_core_io.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>