mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
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:
parent
bd5a715200
commit
0e75b3fa0f
3 changed files with 10 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ struct module_events {
|
|||
uint32_t version;
|
||||
|
||||
void (*loaded) (void *data, int result);
|
||||
void (*destroy) (void *data);
|
||||
};
|
||||
|
||||
struct module_methods {
|
||||
|
|
@ -68,6 +69,7 @@ struct module {
|
|||
};
|
||||
|
||||
#define module_emit_loaded(m,r) spa_hook_list_call(&m->listener_list, struct module_events, loaded, 0, r)
|
||||
#define module_emit_destroy(m) spa_hook_list_call(&(m)->listener_list, struct module_events, destroy, 0)
|
||||
|
||||
struct module *module_create(struct client *client, const char *name, const char *args);
|
||||
void module_free(struct module *module);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue