tunnel modules: Fix threading issues

The old tunnel modules switched wrongly between main thread and I/O-thread
while the new tunnel modules sent unnecessary messages to the main thread.
This patch fixes the issues.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/705>
This commit is contained in:
Georg Chini 2022-05-18 14:43:13 +02:00 committed by PulseAudio Marge Bot
parent 0adb12e099
commit c3d1db2f28
3 changed files with 23 additions and 39 deletions

View file

@ -328,7 +328,7 @@ static void maybe_restart(struct userdata *u) {
pa_restart_module_reinit(u->module, do_init, do_done, u->reconnect_interval_us);
} else {
/* exit the module */
pa_asyncmsgq_post(u->thread_mq->outq, PA_MSGOBJECT(u->module->core), PA_CORE_MESSAGE_UNLOAD_MODULE, u->module, 0, NULL, NULL);
pa_module_unload_request(u->module, true);
}
}