src/pulsecore/cli-command.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0f2fec15b5d2927e1a7db98de084273bf94af20f
Author: Tanu Kaskinen <ta...@iki.fi>
Date:   Fri Aug 18 10:07:27 2017 +0300

    cli-command: unload modules synchronously
    
    Users may want to change the parameters of some load-once modules in
    ~/.config/pulse/default.pa. That should be possible by including
    /etc/pulse/default.pa from the per-user configuration file, and then
    unloading a module and reloading it with different parameters. However,
    that doesn't work, because the unload-module command will not unload the
    module immediately, so the subsequent load-module command will fail when
    the module can be loaded only once.
    
    This patch makes the module unloading synchronous. "pacmd unload-module
    module-cli-protocol-unix" is something that might not like this change,
    since the command will unload the code that is processing the command,
    but I tested it and it works fine. When pa_module_unload() is called,
    that won't yet remove the module code from memory, the lt_dlclose() call
    is postponed until it's safe to remove the code from memory.
    
    BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=102205

diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index 5a632be4..61924707 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -462,13 +462,13 @@ static int pa_cli_command_unload(pa_core *c, pa_tokenizer 
*t, pa_strbuf *buf, bo
             return -1;
         }
 
-        pa_module_unload_request(m, false);
+        pa_module_unload(m, false);
 
     } else {
         PA_IDXSET_FOREACH(m, c->modules, idx)
             if (pa_streq(i, m->name)) {
                 unloaded = true;
-                pa_module_unload_request(m, false);
+                pa_module_unload(m, false);
             }
 
         if (unloaded == false) {

_______________________________________________
pulseaudio-commits mailing list
pulseaudio-commits@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits

Reply via email to