simple: use PA_xxx_IS_GOOD for state checks

This commit is contained in:
Lennart Poettering 2009-08-05 01:03:49 +02:00
parent 5e61111a88
commit a4bc41a7a5

View file

@ -70,8 +70,8 @@ struct pa_simple {
#define CHECK_DEAD_GOTO(p, rerror, label) \ #define CHECK_DEAD_GOTO(p, rerror, label) \
do { \ do { \
if (!(p)->context || pa_context_get_state((p)->context) != PA_CONTEXT_READY || \ if (!(p)->context || !PA_CONTEXT_IS_GOOD(pa_context_get_state((p)->context)) || \
!(p)->stream || pa_stream_get_state((p)->stream) != PA_STREAM_READY) { \ !(p)->stream || !PA_STREAM_IS_GOOD(pa_stream_get_state((p)->stream))) { \
if (((p)->context && pa_context_get_state((p)->context) == PA_CONTEXT_FAILED) || \ if (((p)->context && pa_context_get_state((p)->context) == PA_CONTEXT_FAILED) || \
((p)->stream && pa_stream_get_state((p)->stream) == PA_STREAM_FAILED)) { \ ((p)->stream && pa_stream_get_state((p)->stream) == PA_STREAM_FAILED)) { \
if (rerror) \ if (rerror) \