summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-05 01:05:35 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-05 01:05:35 +0200
commit2cab6a256ca99c20c7f39e330640df6854d35cc8 (patch)
tree3f25cc8fe22813010b7cc3b4cb84ef848e30d089
parent5bbeb516aa3539e30fccf228d5ac31381209a578 (diff)
simple: check for == RUNNING instead of != DONE when waiting for operations
-rw-r--r--src/pulse/simple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index 1e0f3e18..9ed7a653 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -392,7 +392,7 @@ int pa_simple_drain(pa_simple *p, int *rerror) {
CHECK_SUCCESS_GOTO(p, rerror, o, unlock_and_fail);
p->operation_success = 0;
- while (pa_operation_get_state(o) != PA_OPERATION_DONE) {
+ while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) {
pa_threaded_mainloop_wait(p->mainloop);
CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
}
@@ -428,7 +428,7 @@ int pa_simple_flush(pa_simple *p, int *rerror) {
CHECK_SUCCESS_GOTO(p, rerror, o, unlock_and_fail);
p->operation_success = 0;
- while (pa_operation_get_state(o) != PA_OPERATION_DONE) {
+ while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) {
pa_threaded_mainloop_wait(p->mainloop);
CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
}