sink, source: Don't finish move if unlink happens after pa_*_move_all_start() 63/178063/1
authorGeorg Chini <georg@chini.tk>
Sun, 3 Dec 2017 21:29:09 +0000 (22:29 +0100)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 8 May 2018 03:36:20 +0000 (12:36 +0900)
commit1a72522e0d93de8e107fcf39e43d9be354126507
treeb4f81906386beecb3194448223bd809220feb0ed
parente4e5ed4772b776c32d9d16e3d1ed583de7dbf908
sink, source: Don't finish move if unlink happens after pa_*_move_all_start()

When a sink input was unlinked between the calls to pa_sink_move_all_start() and
pa_sink_move_all_finish(), pa_sink_move_all_finish() tried to finish the move
of the already unlinked sink input, which lead to an assertion in
pa_sink_input_finish_move(). The same applies for the source side.

This patch fixes the problem by checking the state of the sink input or
source output in pa_*_move_all_finish().

Bug report: https://bugs.freedesktop.org/show_bug.cgi?id=103752

Change-Id: I4dc7a1c51b3f340adbad51229658e7218d3065d0
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
src/pulsecore/sink.c
src/pulsecore/source.c