[pulseaudio-commits] src/pulsecore
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Tue Oct 3 14:20:49 UTC 2017
src/pulsecore/thread-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d1fa269216a0531a8d943dd3cd3eb14764151d4a
Author: Tanu Kaskinen <tanuk at iki.fi>
Date: Tue Sep 13 15:48:11 2016 +0300
thread-mq: create event on the right mainloop
It seems that the intention was to create create write_thread_event on
thread_mainloop instead of main_mainloop (the first parameter of
io_new() is thread_mainloop, io_free() is called on thread_mainloop
etc.).
As long as both mainloops are implemented with pa_mainloop, this bug has
no effect on behaviour, because the io_new() implementation is the same.
And indeed, with the current code base both mainloops are always
pa_mainloops. However, when the tunnel-new modules switches to pa_rtpoll
as the pa_mainloop_api provider, this bug would cause problems.
diff --git a/src/pulsecore/thread-mq.c b/src/pulsecore/thread-mq.c
index eaa86637..ab3863b0 100644
--- a/src/pulsecore/thread-mq.c
+++ b/src/pulsecore/thread-mq.c
@@ -118,7 +118,7 @@ int pa_thread_mq_init_thread_mainloop(pa_thread_mq *q, pa_mainloop_api *main_mai
pa_assert_se(pa_asyncmsgq_read_before_poll(q->outq) == 0);
pa_asyncmsgq_write_before_poll(q->outq);
pa_assert_se(q->read_main_event = main_mainloop->io_new(main_mainloop, pa_asyncmsgq_read_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_read_cb, q));
- pa_assert_se(q->write_thread_event = main_mainloop->io_new(thread_mainloop, pa_asyncmsgq_write_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_write_outq_cb, q));
+ pa_assert_se(q->write_thread_event = thread_mainloop->io_new(thread_mainloop, pa_asyncmsgq_write_fd(q->outq), PA_IO_EVENT_INPUT, asyncmsgq_write_outq_cb, q));
pa_asyncmsgq_read_before_poll(q->inq);
pa_asyncmsgq_write_before_poll(q->inq);
More information about the pulseaudio-commits
mailing list