handle unlinking of uninitialized sink inputs and source outputs gracefully 10/25210/1
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Wed, 30 Jul 2014 16:35:34 +0000 (19:35 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Wed, 30 Jul 2014 16:35:34 +0000 (19:35 +0300)
commit4aacda159a8d2ac64e745b304c64f7212518d6bf
treece245aa4ee3b053c2bdedb25f7fdf3a1d4e12923
parent7aef9acd2cd24cab65b5369dade3e86204c9b287
handle unlinking of uninitialized sink inputs and source outputs gracefully

There's an upcoming change in PulseAudio that causes the unlink hooks
of sink inputs and source outputs to be fired more often. The hooks
may be fired when the sink input or source output doesn't have
anything but the state variable initialized, so e.g. proplist may be
NULL.

It seems that currently there's only a couple of places that need to
be modified to take NULL proplist into account, but there's a risk
that in the future some of the code that is called from the unlink
handlers will assume that some other thing is initialized. It would be
good to have some way to easily check right in the beginning of the
unlink handlers whether the sink input or source output has been seen
before. If it has been seen, then there are some guarantees about
things being initialized, and if it hasn't been seen, then the unlink
handlers could return immediately.

Change-Id: I1dc75122e185f747c5b3e4e78a237cec3946a38d
murphy/discover.c
murphy/utils.c