<p>Richard Mudgett <strong>uploaded patch set #2</strong> to the change originally created by Frederic LE FOLL.</p><p><a href="https://gerrit.asterisk.org/10022">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_musiconhold.c: Restart MOH if previous hold just reached end-of-file<br><br>On MOH activation, moh_files_readframe() is called while the current<br>stream attached to the channel is NULL and it calls ast_moh_files_next()<br>immediately.  However, it won't call ast_moh_files_next() again if sample<br>reading fails.  The failure may occur because res_musiconhold retains the<br>last sample reading position in the channel data and MOH during the<br>previous hold/retrieve just reached EOF.  Obviously, a bit of bad luck is<br>required here.<br><br>* Restructured moh_files_readframe() to try a second time to start MOH if<br>there was no stream setup and the saved position was at EOF.  Also added<br>comments describing what is going on for each step.<br><br>ASTERISK-28029<br><br>Change-Id: I1508cf2c094f8feca22d6f76deaa9fdfa9944860<br>---<br>M res/res_musiconhold.c<br>1 file changed, 20 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/10022/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/10022">change 10022</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/10022"/><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-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: I1508cf2c094f8feca22d6f76deaa9fdfa9944860 </div>
<div style="display:none"> Gerrit-Change-Number: 10022 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Frederic LE FOLL <frederic.lefoll@c-s.fr> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>