core: Unload the modules and cached samples before unref'ing the core.
authorColin Guthrie <colin@mageia.org>
Tue, 16 Aug 2011 09:54:24 +0000 (10:54 +0100)
committerColin Guthrie <colin@mageia.org>
Tue, 16 Aug 2011 10:01:34 +0000 (11:01 +0100)
commit98ae74e052bfc6e44a4843e0d8a2e01d0e8e8107
tree0b227b5ecbbaa28b4a3588f8b487d0b7122803ee
parent0d349462c776eee50a13e743bdc4a3ac220b086a
core: Unload the modules and cached samples before unref'ing the core.

As various modules can subscribe to unlink callbacks unloading some modules
may trigger hooks in other modules.

The callbacks associated with these hooks could in turn need to use the core
in some capacity (e.g. perhaps they are module loading modules
(e.g. *-discover, filter-apply or gconf etc. and need to use the core to
unload modules they've loaded).

This change simply ensures that all modules and cached samples are unloaded
before freeing the core.
src/daemon/main.c
src/pulsecore/core.c