[Asterisk-code-review] res musiconhold.c: Restart MOH if previous hold just reached... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Thu Sep 6 19:48:54 CDT 2018


Richard Mudgett has uploaded a new patch set (#2) to the change originally created by Frederic LE FOLL. ( https://gerrit.asterisk.org/10022 )

Change subject: res_musiconhold.c: Restart MOH if previous hold just reached end-of-file
......................................................................

res_musiconhold.c: Restart MOH if previous hold just reached end-of-file

On MOH activation, moh_files_readframe() is called while the current
stream attached to the channel is NULL and it calls ast_moh_files_next()
immediately.  However, it won't call ast_moh_files_next() again if sample
reading fails.  The failure may occur because res_musiconhold retains the
last sample reading position in the channel data and MOH during the
previous hold/retrieve just reached EOF.  Obviously, a bit of bad luck is
required here.

* Restructured moh_files_readframe() to try a second time to start MOH if
there was no stream setup and the saved position was at EOF.  Also added
comments describing what is going on for each step.

ASTERISK-28029

Change-Id: I1508cf2c094f8feca22d6f76deaa9fdfa9944860
---
M res/res_musiconhold.c
1 file changed, 20 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/10022/2
-- 
To view, visit https://gerrit.asterisk.org/10022
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1508cf2c094f8feca22d6f76deaa9fdfa9944860
Gerrit-Change-Number: 10022
Gerrit-PatchSet: 2
Gerrit-Owner: Frederic LE FOLL <frederic.lefoll at c-s.fr>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180906/232e2991/attachment-0001.html>


More information about the asterisk-code-review mailing list