<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17887">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">say.c: Prevent erroneous failures with 'say' family of functions.<br><br>A regression was introduced in ASTERISK~29531 that caused 'say'<br>functions to fail with file lists that would previously have<br>succeeded. This caused affected channels to hang up where previously<br>they would have continued.<br><br>We now explicitly check for the empty string to restore the previous<br>behavior.<br><br>ASTERISK-29859 #close<br><br>Change-Id: Ia2e5769868e2792313c2d7c07996efe009c6f8d5<br>(cherry picked from commit 3fd47840c93bd834cda82562f121eec5883b5a23)<br>---<br>M main/say.c<br>1 file changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/17887/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/say.c b/main/say.c</span><br><span>index ebbb9f0..df9462a 100644</span><br><span>--- a/main/say.c</span><br><span>+++ b/main/say.c</span><br><span>@@ -180,6 +180,13 @@</span><br><span> if (!filenames) {</span><br><span> return -1;</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ /* No filenames to play? Return success so we don't hang up erroneously */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_str_strlen(filenames) == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_free(filenames);</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> files = ast_str_buffer(filenames);</span><br><span> </span><br><span> while ((fn = strsep(&files, "&"))) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17887">change 17887</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/+/17887"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: certified/18.9 </div>
<div style="display:none"> Gerrit-Change-Id: Ia2e5769868e2792313c2d7c07996efe009c6f8d5 </div>
<div style="display:none"> Gerrit-Change-Number: 17887 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-CC: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>