bluetooth: don't busy loop when device is not writable but we want to write

This commit is contained in:
Lennart Poettering 2009-07-01 02:21:17 +02:00
parent c3958aaa07
commit cd70d7f5b0

View file

@ -1355,7 +1355,7 @@ static void thread_func(void *userdata) {
writable = FALSE; writable = FALSE;
} }
if ((!u->source || !PA_SOURCE_IS_LINKED(u->source->thread_info.state)) && do_write <= 0) { if ((!u->source || !PA_SOURCE_IS_LINKED(u->source->thread_info.state)) && do_write <= 0 && writable) {
pa_usec_t time_passed, next_write_at, sleep_for; pa_usec_t time_passed, next_write_at, sleep_for;
/* Hmm, there is no input stream we could synchronize /* Hmm, there is no input stream we could synchronize