diff options
author | David Henningsson <david.henningsson@canonical.com> | 2015-06-11 14:00:08 +0200 |
---|---|---|
committer | David Henningsson <david.henningsson@canonical.com> | 2015-06-18 11:01:24 +0200 |
commit | 8f12ef901c183454eecce2faefd759f040e738fd (patch) | |
tree | 8091eed08f55954975907570e04f5ed6155962d4 /src | |
parent | aafb56d9024eb09135da1a58b8a0948095b7f998 (diff) |
module: Warn about modules loaded after unload
We have crashes related to modules loaded after unload. This added
warning can provide some information about what that module is,
which in turn can help us solve the crashes, hopefully.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90108
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c index 8683cc15d..1d4187eeb 100644 --- a/src/pulsecore/module.c +++ b/src/pulsecore/module.c @@ -313,7 +313,11 @@ void pa_module_unload_all(pa_core *c) { pa_xfree(indices); /* Just in case module unloading caused more modules to load */ + PA_IDXSET_FOREACH(m, c->modules, state) + pa_log_warn("After module unload, module '%s' was still loaded!", m->name); + c->disallow_module_loading = 1; pa_idxset_remove_all(c->modules, (pa_free_cb_t) pa_module_free); + pa_assert(pa_idxset_isempty(c->modules)); if (c->module_defer_unload_event) { c->mainloop->defer_free(c->module_defer_unload_event); |