DBus requests are received by the public DBus connection, because it registers the relevant bus name. My previous patches told PBAP to listen on a private connection, but DBus doesn't let connections share bus names, so it needs to listen on the public connection instead. This adds a little more complexity to the logind callbacks, to avoid unregistering profiles during shutdown. It also removes an API I previously added, which is no longer used and would only encourage the next person to make the same mistake. While reviewing this change, it became obvious seat-detection should be merged into the normal driver interface instead. That change is likely to add time and could create its own bugs, so this series fixes the simple bug while we discuss the deeper issue. Reported-by: Frédéric Danis <frederic.danis@xxxxxxxxxxxxx> Closes: https://lore.kernel.org/linux-bluetooth/333ad76e-0aba-4f93-b141-8e69fb47535f@xxxxxxxxxxxxx/ Suggested-by: Pauli Virtanen <pav@xxxxxx> Signed-off-by: Andrew Sayers <kernel.org@xxxxxxxxxxxxxxx> -- Frédéric and Pauli - please let me know if you'd like to be CCed on the architecture discussion. Otherwise, I'll assume you're not interested in that part of the problem. V1 -> V2 Move instances of "(void)foo" below "int bar" (fixes a "mixed declarations and code" error) Andrew Sayers (3): obexd: Pass at_(un)register value to logind callbacks pbap: use the public DBus connection Revert "obexd: Support creating private system/session bus connections" obexd/client/pbap.c | 28 ++++++++++++++++++++++++---- obexd/plugins/bluetooth.c | 6 ++++-- obexd/src/logind.c | 14 +++++++------- obexd/src/logind.h | 8 ++++---- obexd/src/main.c | 8 -------- obexd/src/obexd.h | 2 -- 6 files changed, 39 insertions(+), 27 deletions(-)