[PATCH] Fix crash in threaded message queues

David Henningsson david.henningsson at canonical.com
Sun Sep 25 02:07:47 PDT 2011


Once in a million or so, this typo causes a crash when two threads
simultaneously try to call "pa_asynqmsgq_write_poll".

BugLink: http://bugs.launchpad.net/bugs/853560
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/pulsecore/thread-mq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/pulsecore/thread-mq.c b/src/pulsecore/thread-mq.c
index 51fb765..b492793 100644
--- a/src/pulsecore/thread-mq.c
+++ b/src/pulsecore/thread-mq.c
@@ -42,7 +42,7 @@ static void asyncmsgq_read_cb(pa_mainloop_api*api, pa_io_event* e, int fd, pa_io
     pa_assert(events == PA_IO_EVENT_INPUT);
 
     pa_asyncmsgq_ref(aq = q->outq);
-    pa_asyncmsgq_write_after_poll(aq);
+    pa_asyncmsgq_read_after_poll(aq);
 
     for (;;) {
         pa_msgobject *object;
-- 
1.7.5.4


--------------050702070600000801040608--


More information about the pulseaudio-discuss mailing list