diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-12-17 21:19:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-01-12 20:27:20 +0100 |
commit | 7272c026103beccec8a04bb0831effb6898733a0 (patch) | |
tree | 472439b0be894c258b502f6ff704ffa4df9caa42 /src/pulsecore/module.c | |
parent | 09e3c5e7160047e3691fc94603c0c9f48f60d5bc (diff) |
introduce new function pa_module_unload_request_by_index
Diffstat (limited to 'src/pulsecore/module.c')
-rw-r--r-- | src/pulsecore/module.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c index 9b17cb91..56ed2c5d 100644 --- a/src/pulsecore/module.c +++ b/src/pulsecore/module.c @@ -280,6 +280,16 @@ void pa_module_unload_request(pa_module *m, pa_bool_t force) { m->core->mainloop->defer_enable(m->core->module_defer_unload_event, 1); } +void pa_module_unload_request_by_index(pa_core *c, uint32_t idx, pa_bool_t force) { + pa_module *m; + pa_assert(c); + + if (!(m = pa_idxset_get_by_index(c->modules, idx))) + return; + + pa_module_unload_request(m, force); +} + void pa_module_set_used(pa_module*m, int used) { pa_assert(m); |