From: Lennart Poettering Date: Tue, 4 Aug 2009 23:05:35 +0000 (+0200) Subject: simple: check for == RUNNING instead of != DONE when waiting for operations X-Git-Tag: submit/2.0-panda/20130828.192557~1588 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cab6a256ca99c20c7f39e330640df6854d35cc8;p=profile%2Fivi%2Fpulseaudio-panda.git simple: check for == RUNNING instead of != DONE when waiting for operations --- diff --git a/src/pulse/simple.c b/src/pulse/simple.c index 1e0f3e1..9ed7a65 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); }