Commit f58e8c40 authored by Arun Raghavan's avatar Arun Raghavan

dbus: Deal with double-counting module-dbus-protocol

We ended up dealing with it once in module init, and once more in the
new module callback. Avoiding it in the second case by name seems to be
the cleanest solution (else, we need to store the module index somewhere
in pa_dbusiface_core, which seems about as bad).
Signed-off-by: Arun Raghavan's avatarArun Raghavan <>
parent 9c7e4b8e
......@@ -1588,6 +1588,14 @@ static pa_hook_result_t module_new_cb(void *hook_data, void *call_data, void *sl
if (pa_streq(module->name, "module-dbus-protocol")) {
/* module-dbus-protocol can only be loaded once, and will be accounted
* for while iterating core->modules in pa_dbusiface_core_new(). As it
* happens, we will also see it here when the hook is called after the
* module is initialised, so we ignore it. */
return PA_HOOK_OK;
module_iface = pa_dbusiface_module_new(module);
pa_assert_se(pa_hashmap_put(c->modules, PA_UINT32_TO_PTR(module->index), module_iface) >= 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment