[pulseaudio-discuss] [PATCH 1/2] zeroconf-publish: Add locking around pa_mainloop_api_once()

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sat Mar 15 00:37:05 PDT 2014


Commit e1e154c7377779377fa1a36655a10effd693f7b5 added locking around
pa_mainloop_api_once() everywhere except pa__done(). This fixes that
omission.
---
 src/modules/module-zeroconf-publish.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/module-zeroconf-publish.c b/src/modules/module-zeroconf-publish.c
index 0110e1d..35277c2 100644
--- a/src/modules/module-zeroconf-publish.c
+++ b/src/modules/module-zeroconf-publish.c
@@ -807,7 +807,9 @@ void pa__done(pa_module*m) {
     if (!(u = m->userdata))
         return;
 
+    pa_threaded_mainloop_lock(u->mainloop);
     pa_mainloop_api_once(u->api, client_free, u);
+    pa_threaded_mainloop_unlock(u->mainloop);
     pa_asyncmsgq_wait_for(u->thread_mq.outq, AVAHI_MESSAGE_SHUTDOWN_COMPLETE);
 
     pa_threaded_mainloop_stop(u->mainloop);
-- 
1.8.3.1



More information about the pulseaudio-discuss mailing list