<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18714">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Benjamin Keith Ford: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">say: Abort play loop if caller hangs up.<br><br>If the caller has hung up, break out of the play loop so we don't try<br>to play remaining files and fail to do so.<br><br>ASTERISK-30075 #close<br><br>Change-Id: I55e85be28ee90b48c0fe4ce20ac136a7dbb49f14<br>---<br>M main/say.c<br>1 file changed, 3 insertions(+), 9 deletions(-)<br><br></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 8fb5e97..b60d4bf 100644</span><br><span>--- a/main/say.c</span><br><span>+++ b/main/say.c</span><br><span>@@ -189,19 +189,13 @@</span><br><span> </span><br><span> files = ast_str_buffer(filenames);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- while ((fn = strsep(&files, "&"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ while (!res && (fn = strsep(&files, "&"))) {</span><br><span> res = ast_streamfile(chan, fn, lang);</span><br><span> if (!res) {</span><br><span style="color: hsl(0, 100%, 40%);">- if ((audiofd > -1) && (ctrlfd > -1))</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((audiofd > -1) && (ctrlfd > -1)) {</span><br><span> res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span> res = ast_waitstream(chan, ints);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- if (res > 0) {</span><br><span style="color: hsl(0, 100%, 40%);">- /* We were interrupted by a digit */</span><br><span style="color: hsl(0, 100%, 40%);">- ast_stopstream(chan);</span><br><span style="color: hsl(0, 100%, 40%);">- ast_free(filenames);</span><br><span style="color: hsl(0, 100%, 40%);">- return res;</span><br><span> }</span><br><span> }</span><br><span> ast_stopstream(chan);</span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18714">change 18714</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/+/18714"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I55e85be28ee90b48c0fe4ce20ac136a7dbb49f14 </div>
<div style="display:none"> Gerrit-Change-Number: 18714 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>