summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-07-31 21:53:48 +0000
committerLennart Poettering <lennart@poettering.net>2006-07-31 21:53:48 +0000
commitccf67d2988521a8caf14ef1d650dcab4764462e4 (patch)
tree63a366708d78fffa5777eccd36ed963731d3aece
parente2e94ca47c5fc8b52ec28d9811a6da199a2c7262 (diff)
deal properly with recursive module unloading
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1174 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index e7dca78d..3568059e 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -224,10 +224,14 @@ static void free_callback(void *p, PA_GCC_UNUSED void *userdata) {
void pa_module_unload_all(pa_core *c) {
assert(c);
+ pa_module *m;
if (!c->modules)
return;
+ while ((m = pa_idxset_first(c->modules, NULL)))
+ pa_module_unload(c, m);
+
pa_idxset_free(c->modules, free_callback, NULL);
c->modules = NULL;