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

<h2>branch: master updated</h2>
<pre>
       via: 4f5ca9e88dc1a94efa78878ca576d62345203ca2 (commit)
      from: 06988e1a36d0f6f8b35651d36fdab79ac8c63c5c (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Christopher Rienzo
comments: 
FS-3077 prevent crash on double call to asr_close

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c</span>
<span style="color: #000080; font-weight: bold">index d5bac5f..8698e4a 100644</span>
<span style="color: #A00000">--- a/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c</span>
<span style="color: #00A000">+++ b/src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c</span>
<span style="color: #800080; font-weight: bold">@@ -3155,15 +3155,19 @@ static switch_status_t recog_asr_disable_all_grammars(switch_asr_handle_t *ah)</span>
 static switch_status_t recog_asr_close(switch_asr_handle_t *ah, switch_asr_flag_t *flags)
 {
         speech_channel_t *schannel = (speech_channel_t *) ah-&gt;private_info;
<span style="color: #A00000">-        recognizer_data_t *r = (recognizer_data_t *) schannel-&gt;data;</span>
<span style="color: #A00000">-        speech_channel_stop(schannel);</span>
<span style="color: #A00000">-        speech_channel_destroy(schannel);</span>
<span style="color: #A00000">-        switch_core_hash_destroy(&amp;r-&gt;grammars);</span>
<span style="color: #A00000">-        switch_core_hash_destroy(&amp;r-&gt;enabled_grammars);</span>
<span style="color: #A00000">-        if (r-&gt;dtmf_generator) {</span>
<span style="color: #A00000">-                mpf_dtmf_generator_destroy(r-&gt;dtmf_generator);</span>
<span style="color: #A00000">-        }</span>
<span style="color: #00A000">+        recognizer_data_t *r = NULL;</span>
 
<span style="color: #00A000">+        /* close if not already closed */</span>
<span style="color: #00A000">+        if (schannel != NULL &amp;&amp; !switch_test_flag(ah, SWITCH_ASR_FLAG_CLOSED)) {</span>
<span style="color: #00A000">+                r = (recognizer_data_t *) schannel-&gt;data;</span>
<span style="color: #00A000">+                speech_channel_stop(schannel);</span>
<span style="color: #00A000">+                speech_channel_destroy(schannel);</span>
<span style="color: #00A000">+                switch_core_hash_destroy(&amp;r-&gt;grammars);</span>
<span style="color: #00A000">+                switch_core_hash_destroy(&amp;r-&gt;enabled_grammars);</span>
<span style="color: #00A000">+                if (r-&gt;dtmf_generator) {</span>
<span style="color: #00A000">+                        mpf_dtmf_generator_destroy(r-&gt;dtmf_generator);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
         /* this lets FreeSWITCH&#39;s speech_thread know the handle is closed */
         switch_set_flag(ah, SWITCH_ASR_FLAG_CLOSED);
 
</pre></div>
========================================================================<pre>

Summary of changes:
 src/mod/asr_tts/mod_unimrcp/mod_unimrcp.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 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>