]> code.delx.au - pulseaudio/blobdiff - polyp/module.c
add support for automatic termination of the daemon after the last client quit
[pulseaudio] / polyp / module.c
index fc71495377b69d1146f3f28f856ca63bae34b498..a06b27541cb0a217972c1329d231a62e91d0619c 100644 (file)
@@ -117,6 +117,10 @@ fail:
 
 static void pa_module_free(struct pa_module *m) {
     assert(m && m->done && m->core);
+
+    if (m->core->disallow_module_loading)
+        return;
+
     m->done(m->core, m);
 
     lt_dlclose(m->dl);
@@ -130,7 +134,6 @@ static void pa_module_free(struct pa_module *m) {
     pa_xfree(m);
 }
 
-
 void pa_module_unload(struct pa_core *c, struct pa_module *m) {
     assert(c && m);