diff options
Diffstat (limited to 'src/pulsecore/core.c')
-rw-r--r-- | src/pulsecore/core.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index 4acc14a61..eec97d1c4 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -333,11 +333,11 @@ pa_mempool* pa_core_new_mempool(pa_core *c, pa_mem_type_t shm_type, bool per_cli return pa_mempool_new(shm_type, c->shm_size, per_client); } -/* FIXME: Should these be taking a ref during the copy? */ - bool pa_core_check_access_sync(pa_core *c, pa_client *client, pa_access_hook_t hook, uint32_t idx, pa_subscription_event_type_t event, const char *name) { pa_access_data data; + pa_assert(c); + if (client == NULL) return true; @@ -346,11 +346,25 @@ bool pa_core_check_access_sync(pa_core *c, pa_client *client, pa_access_hook_t h data.object_index = idx; data.event = event; data.name = name; - data.async_finish_cb = NULL; + data.complete_cb = NULL; return pa_hook_fire(&c->access[data.hook], &data) == PA_HOOK_OK; } +pa_hook_result_t pa_core_check_access(pa_core *c, pa_client *client, pa_access_data *data) { + pa_assert(c); + pa_assert(data); + + if (client == NULL) + return PA_HOOK_OK; + + data->client_index = client->index; + + return pa_hook_fire(&c->access[data->hook], data); +} + +/* FIXME: Should these be taking a ref during the copy? */ + pa_idxset* pa_core_get_modules(pa_core *c, pa_client *client) { pa_idxset *s; uint32_t idx; |