summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2016-05-29 10:34:36 +0530
committerArun Raghavan <arun@arunraghavan.net>2016-05-29 10:36:47 +0530
commitf58e8c405c573a5a68be410d1add6dd1abeef9d6 (patch)
treea806cb730525a5635a6c5dac5a33fd295fc368bd
parent9c7e4b8eb9139ba494c5e3877a7f585f0eec9c62 (diff)
downloadpulseaudio-f58e8c405c573a5a68be410d1add6dd1abeef9d6.tar.gz
dbus: Deal with double-counting module-dbus-protocolv8.99.2
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 <arun@arunraghavan.net>
-rw-r--r--src/modules/dbus/iface-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/dbus/iface-core.c b/src/modules/dbus/iface-core.c
index 3d2c8eee7..508913de1 100644
--- a/src/modules/dbus/iface-core.c
+++ b/src/modules/dbus/iface-core.c
@@ -1588,6 +1588,14 @@ static pa_hook_result_t module_new_cb(void *hook_data, void *call_data, void *sl
pa_assert(c);
pa_assert(module);
+ 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);