<p style="white-space: pre-wrap; word-wrap: break-word;">Should we not fix the ODBC bug instead?<br></p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/12981">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/12981/1/apps/app_voicemail.c">File apps/app_voicemail.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/12981/1/apps/app_voicemail.c@5511">Patch Set #1, Line 5511:</a> <code style="font-family:monospace,monospace">fopen</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Why not use access() instead of trying to open the file?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/12981/1/apps/app_voicemail.c@5514">Patch Set #1, Line 5514:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if (c)<br> *c = '\0';<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Always use braces with an "if".</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/12981/1/apps/app_voicemail.c@5518">Patch Set #1, Line 5518:</a> <code style="font-family:monospace,monospace">fopen</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same. Why not use access()?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/12981/1/apps/app_voicemail.c@5558">Patch Set #1, Line 5558:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> } else {<br> if (!strcasecmp(format, "wav")) {<br> if (vmu->volgain < -.001 || vmu->volgain > .001) {<br> res = snprintf(sox_gain_cmd, sizeof(sox_gain_cmd), "sox -v %.4f %s.%s -e signed-integer -b 16 %s",<br> vmu->volgain, attach, altformat, fname);<br> } else {<br> res = snprintf(sox_gain_cmd, sizeof(sox_gain_cmd), "sox %s.%s -e signed-integer -b 16 %s",<br> attach, altformat, fname);<br> }<br> } else {<br> if (vmu->volgain < -.001 || vmu->volgain > .001) {<br> res = snprintf(sox_gain_cmd, sizeof(sox_gain_cmd), "sox -v %.4f %s.%s %s",<br> vmu->volgain, attach, altformat, fname);<br> } else {<br> res = snprintf(sox_gain_cmd, sizeof(sox_gain_cmd), "sox %s.%s %s",<br> attach, altformat, fname);<br> <br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Can you explain why we need this logic? What was it about the original sox command that no longer works?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/12981">change 12981</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/12981"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I7321e7f7e7c58adbf41dd4fd7191c887b9b2eafd </div>
<div style="display:none"> Gerrit-Change-Number: 12981 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: cmaj <chris@penguinpbx.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 08 Oct 2019 11:58:40 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>