]> code.delx.au - pulseaudio/commitdiff
simple: use PA_xxx_IS_GOOD for state checks
authorLennart Poettering <lennart@poettering.net>
Tue, 4 Aug 2009 23:03:49 +0000 (01:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 4 Aug 2009 23:03:49 +0000 (01:03 +0200)
src/pulse/simple.c

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