<h1>Project "FreeSWITCH Source" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: f8d326de2037046316f506435ba685f263cb7a15 (commit)
      from: 097caed43fa232916146a5bd6b5b7fa264d11841 (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
FS-3057 tested on linux

<span style="color: #000080; font-weight: bold">diff --git a/src/switch_rtp.c b/src/switch_rtp.c</span>
<span style="color: #000080; font-weight: bold">index 3432422..d0c22ce 100644</span>
<span style="color: #A00000">--- a/src/switch_rtp.c</span>
<span style="color: #00A000">+++ b/src/switch_rtp.c</span>
<span style="color: #800080; font-weight: bold">@@ -2661,13 +2661,25 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
         
         while (switch_rtp_ready(rtp_session)) {
                 int do_cng = 0;
<span style="color: #00A000">+                int read_pretriggered = 0;</span>
                 bytes = 0;
 
                 if (rtp_session-&gt;timer.interval) {
                         if ((switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOFLUSH) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_STICKY_FLUSH)) &amp;&amp;
                                 rtp_session-&gt;read_pollfd) {
                                 if (switch_poll(rtp_session-&gt;read_pollfd, 1, &amp;fdr, 0) == SWITCH_STATUS_SUCCESS) {
<span style="color: #A00000">-                                        rtp_session-&gt;hot_hits += rtp_session-&gt;samples_per_interval;</span>
<span style="color: #00A000">+                                        status = read_rtp_packet(rtp_session, &amp;bytes, flags);</span>
<span style="color: #00A000">+                                        /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Initial %d\n&quot;, bytes); */</span>
<span style="color: #00A000">+                                        read_pretriggered = 1;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                                        if (switch_poll(rtp_session-&gt;read_pollfd, 1, &amp;fdr, 0) == SWITCH_STATUS_SUCCESS) {</span>
<span style="color: #00A000">+                                                /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Trigger %d\n&quot;, rtp_session-&gt;hot_hits); */</span>
<span style="color: #00A000">+                                                rtp_session-&gt;hot_hits += rtp_session-&gt;samples_per_interval;</span>
<span style="color: #00A000">+                                        } else {</span>
<span style="color: #00A000">+                                                rtp_session-&gt;hot_hits = 0;</span>
<span style="color: #00A000">+                                                switch_core_timer_sync(&amp;rtp_session-&gt;timer);</span>
<span style="color: #00A000">+                                                goto recvfrom;</span>
<span style="color: #00A000">+                                        }</span>
                                         
                                         if (rtp_session-&gt;hot_hits &gt;= rtp_session-&gt;samples_per_second * 5) {
                                                 switch_set_flag(rtp_session, SWITCH_RTP_FLAG_FLUSH);
<span style="color: #800080; font-weight: bold">@@ -2695,7 +2707,9 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
                 }
 
         recvfrom:
<span style="color: #A00000">-                bytes = 0;</span>
<span style="color: #00A000">+                if (!read_pretriggered) {</span>
<span style="color: #00A000">+                        bytes = 0;</span>
<span style="color: #00A000">+                }</span>
                 read_loops++;
                 poll_loop = 0;
 
<span style="color: #800080; font-weight: bold">@@ -2723,7 +2737,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_</span>
                 }
 
                 if (poll_status == SWITCH_STATUS_SUCCESS) {
<span style="color: #A00000">-                        status = read_rtp_packet(rtp_session, &amp;bytes, flags);</span>
<span style="color: #00A000">+                        if (!read_pretriggered) {</span>
<span style="color: #00A000">+                                status = read_rtp_packet(rtp_session, &amp;bytes, flags);</span>
<span style="color: #00A000">+                                /* switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Read bytes %d\n&quot;, bytes); */</span>
<span style="color: #00A000">+                        }</span>
                 } else {
                         if (!SWITCH_STATUS_IS_BREAK(poll_status) &amp;&amp; poll_status != SWITCH_STATUS_TIMEOUT) {
                                 char tmp[128] = &quot;&quot;;
</pre></div>
========================================================================<pre>

Summary of changes:
 src/switch_rtp.c |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 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>