pulse-server: improve module loading

Modules no longer need to emit the "loaded" event manually
if they can load immediately. In that case, the module loading
code will take care of emitting the event. If they can't,
they must return an async spa result, and emit the "loaded" event
when they see fit.

Fixes #1232
This commit is contained in:
Barnabás Pőcze 2021-06-10 18:37:48 +02:00
parent 4d02233ff3
commit bd6f63fecd
16 changed files with 57 additions and 70 deletions

View file

@ -41,7 +41,7 @@ struct module_events {
#define VERSION_MODULE_EVENTS 0
uint32_t version;
void (*loaded) (void *data, int res);
void (*loaded) (void *data, int result);
};
#define module_emit_loaded(m,r) spa_hook_list_call(&m->listener_list, struct module_events, loaded, 0, r)