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

<h2>branch: master updated</h2>
<pre>
       via: 1842798e95eeeed61604455ebcd5001bdf35eeb1 (commit)
      from: 155571d841effd7411686952da0d679af34bc0ac (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Moises Silva
comments: 
freetdm: ftmod_r2 - check for io dump file errors on open

<span style="color: #000080; font-weight: bold">diff --git a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #000080; font-weight: bold">index 0217a51..d86fb43 100644</span>
<span style="color: #A00000">--- a/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #00A000">+++ b/libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c</span>
<span style="color: #800080; font-weight: bold">@@ -729,16 +729,24 @@ static void dump_mf(openr2_chan_t *r2chan)</span>
                 snprintf(dfile, sizeof(dfile), logname ? &quot;%s.s%dc%d.input.alaw&quot; : &quot;%s/s%dc%d.input.alaw&quot;, 
                                 logname ? logname : r2data-&gt;logdir, ftdmchan-&gt;span_id, ftdmchan-&gt;chan_id);
                 f = fopen(dfile, &quot;wb&quot;);
<span style="color: #A00000">-                ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, &quot;Dumping IO input in file %s\n&quot;, dfile);</span>
<span style="color: #A00000">-                ftdm_channel_command(ftdmchan, FTDM_COMMAND_DUMP_INPUT, f);</span>
<span style="color: #A00000">-                fclose(f);</span>
<span style="color: #00A000">+                if (f) {</span>
<span style="color: #00A000">+                        ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, &quot;Dumping IO input in file %s\n&quot;, dfile);</span>
<span style="color: #00A000">+                        ftdm_channel_command(ftdmchan, FTDM_COMMAND_DUMP_INPUT, f);</span>
<span style="color: #00A000">+                        fclose(f);</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, &quot;Could not dump IO input in file %s, error: %s&quot;, dfile, strerror(errno));</span>
<span style="color: #00A000">+                }</span>
 
                 snprintf(dfile, sizeof(dfile), logname ? &quot;%s.s%dc%d.output.alaw&quot; : &quot;%s/s%dc%d.output.alaw&quot;, 
                                 logname ? logname : r2data-&gt;logdir, ftdmchan-&gt;span_id, ftdmchan-&gt;chan_id);
                 f = fopen(dfile, &quot;wb&quot;);
<span style="color: #A00000">-                ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, &quot;Dumping IO output in file %s\n&quot;, dfile);</span>
<span style="color: #A00000">-                ftdm_channel_command(ftdmchan, FTDM_COMMAND_DUMP_OUTPUT, f);</span>
<span style="color: #A00000">-                fclose(f);</span>
<span style="color: #00A000">+                if (f) {</span>
<span style="color: #00A000">+                        ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, &quot;Dumping IO output in file %s\n&quot;, dfile);</span>
<span style="color: #00A000">+                        ftdm_channel_command(ftdmchan, FTDM_COMMAND_DUMP_OUTPUT, f);</span>
<span style="color: #00A000">+                        fclose(f);</span>
<span style="color: #00A000">+                } else {</span>
<span style="color: #00A000">+                        ftdm_log_chan(ftdmchan, FTDM_LOG_ERROR, &quot;Could not dump IO output in file %s, error: %s&quot;, dfile, strerror(errno));</span>
<span style="color: #00A000">+                }</span>
         }
 }
 
</pre></div>
========================================================================<pre>

Summary of changes:
 libs/freetdm/src/ftmod/ftmod_r2/ftmod_r2.c |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 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>