]> code.delx.au - pulseaudio/commitdiff
bluetooth: stream also when source is suspended
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 5 Mar 2009 16:18:07 +0000 (18:18 +0200)
committerMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 5 Mar 2009 16:19:39 +0000 (18:19 +0200)
src/modules/bluetooth/module-bluetooth-device.c

index 3e09611e12b305bddfb64eddcd4134f4df1193a0..2d9ede505382ff757af620ab0ec6b37ee8e096f3 100644 (file)
@@ -1164,8 +1164,8 @@ static void thread_func(void *userdata) {
 
         /* Hmm, nothing to do. Let's sleep */
         if (pollfd)
-            pollfd->events = (short) (((u->sink && PA_SINK_IS_OPENED(u->sink->thread_info.state) && !writable) ? POLLOUT : 0) |
-                                      (u->source && PA_SOURCE_IS_OPENED(u->source->thread_info.state) ? POLLIN : 0));
+            pollfd->events = (short) (((u->sink && PA_SINK_IS_LINKED(u->sink->thread_info.state) && !writable) ? POLLOUT : 0) |
+                                      (u->source && PA_SOURCE_IS_LINKED(u->source->thread_info.state) ? POLLIN : 0));
 
         if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0)
             goto fail;