pulse-server: handle if the module is destroyed while loading

Create a new event for modules ('destroy') which is emitted from
`module_free()`. It is used by the module loading logic, to handle
when a module is destroyed without properly loading first.
This commit is contained in:
Barnabás Pőcze 2021-11-12 18:54:17 +01:00 committed by Wim Taymans
parent bd5a715200
commit 0e75b3fa0f
3 changed files with 10 additions and 0 deletions

View file

@ -92,6 +92,8 @@ void module_free(struct module *module)
{
struct impl *impl = module->impl;
module_emit_destroy(module);
if (module->idx != SPA_ID_INVALID)
pw_map_remove(&impl->modules, module->idx & INDEX_MASK);