null-sink, pipe-sink: some state variable cleanups
authorTanu Kaskinen <tanuk@iki.fi>
Wed, 21 Feb 2018 09:54:41 +0000 (11:54 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 23 Feb 2018 11:36:35 +0000 (13:36 +0200)
commit7f09164ed7979210adcdb7674b9d6217fd44ed66
tree86b9d7f0f09d14537f6385276592ddbd7f871cd5
parent2dff0d6a6a4df2aab6f36212b705489d5af42835
null-sink, pipe-sink: some state variable cleanups

pa_sink_get_state() is supposed to be used from the main thread. In this
case it doesn't really matter, because the SET_STATE handler is executed
while the main thread is waiting, but since the state is available also
in thread_info, let's use that. All other modules use thread_info.state
too, so at least this change improves consistency.

Also, we can use the PA_SINK_IS_OPENED macro to simplify the code a bit.
src/modules/module-null-sink.c
src/modules/module-pipe-sink.c