]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_confbridge: Race between removing and playing name recording while leaving
authorRobert Mordec <r.mordec@slican.pl>
Tue, 23 May 2017 10:45:29 +0000 (12:45 +0200)
committerRobert Mordec <r.mordec@slican.pl>
Tue, 23 May 2017 12:16:11 +0000 (14:16 +0200)
commitf1b32de2c5fb8854183f0c7d8c9df7470ab9c140
tree3aeea524c35af22aa9af47e9a61375f2044ecd82
parent7af41de3643cab760be85e9e2dbe79d634193f96
app_confbridge: Race between removing and playing name recording while leaving

When user leaves a conference, its channel calls async_play_sound_file()
in order to play the name announcement and then unlinks the sound file.
The async_play_sound_file() function adds a task to conference playback queue,
which then runs playback_common() function in a different thread.

It leads to a race condition when, in some cases, channel thread may unlink
the sound file before playback_common() had a chance to open it.

This patch creates a file deletion task, that is queued after playback.

ASTERISK-27012 #close

Change-Id: I412f7922d412004b80917d4e892546c15bd70dd3
apps/app_confbridge.c