pulse-server: clear hook list when module is freed

Moreover, rename the hook list to "listener_list".
This commit is contained in:
Barnabás Pőcze 2021-06-10 18:31:50 +02:00
parent d9befc0792
commit 6f5b089767
2 changed files with 9 additions and 5 deletions

View file

@ -44,7 +44,7 @@ struct module_events {
void (*loaded) (void *data, int res);
};
#define module_emit_loaded(m,r) spa_hook_list_call(&m->hooks, struct module_events, loaded, 0, r)
#define module_emit_loaded(m,r) spa_hook_list_call(&m->listener_list, struct module_events, loaded, 0, r)
struct module_methods {
#define VERSION_MODULE_METHODS 0
@ -61,7 +61,7 @@ struct module {
struct pw_properties *props;
struct impl *impl;
const struct module_methods *methods;
struct spa_hook_list hooks;
struct spa_hook_list listener_list;
void *user_data;
};