[Asterisk-code-review] res_musiconhold.c: Prevent crash with realtime MoH (asterisk[16])

Sean Bright asteriskteam at digium.com
Tue Aug 4 11:31:46 CDT 2020


Hello Joshua Colp, Kevin Harwell, Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/14686

to look at the new patch set (#2).

Change subject: res_musiconhold.c: Prevent crash with realtime MoH
......................................................................

res_musiconhold.c: Prevent crash with realtime MoH

The MoH class internal file vector is potentially being manipulated by
multiple threads at the same time without sufficient locking. Switch to
a reference counted list and operate on copies where necessary.

Two other minor changes:

* Use struct dirent::d_type if it is available to avoid a stat() call

* Make the music class directory absolute at initialization time instead
  of each time we look for files

ASTERISK-28927 #close

Change-Id: I479c5dcf88db670956e8cac177b5826c986b0217
---
M res/res_musiconhold.c
1 file changed, 189 insertions(+), 87 deletions(-)


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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I479c5dcf88db670956e8cac177b5826c986b0217
Gerrit-Change-Number: 14686
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200804/a5cc4c44/attachment.html>


More information about the asterisk-code-review mailing list