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

Sean Bright asteriskteam at digium.com
Mon Jul 20 09:06:01 CDT 2020


Sean Bright has uploaded a new patch set (#2). ( https://gerrit.asterisk.org/c/asterisk/+/14684 )

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, 150 insertions(+), 82 deletions(-)


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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I479c5dcf88db670956e8cac177b5826c986b0217
Gerrit-Change-Number: 14684
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-CC: Friendly Automation
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200720/3a6432a6/attachment.html>


More information about the asterisk-code-review mailing list