From aaa515f47df22eeaebda18f1b5c151e71bdf1bd6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 15 Dec 2021 11:49:20 +0000 Subject: [PATCH] sysdeps: Document _dbus_daemon_unpublish_session_bus_address Signed-off-by: Simon McVittie --- dbus/dbus-sysdeps-unix.c | 3 +-- dbus/dbus-sysdeps-win.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 94c2be30..8743589f 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -4632,11 +4632,10 @@ _dbus_append_keyring_directory_for_credentials (DBusString *directory, return FALSE; } -//PENDING(kdab) docs +/* Documented in dbus-sysdeps-win.c, does nothing on Unix */ void _dbus_daemon_unpublish_session_bus_address (void) { - } /** diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 950d900a..43350cc7 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -3127,6 +3127,22 @@ _dbus_daemon_publish_session_bus_address (const char* address, const char *scope return TRUE; } +/** + * Clear the platform-specific centralized location where the session + * bus address is published. + * + * This must only be called if \ref DBusServer.published_address is #TRUE, + * which is be the case if and only if platform-specific code has published + * the address centrally. + * + * On Windows, this is implemented by closing a global shared memory segment. + * + * On Unix, the session bus address is not published in a centralized + * location by libdbus, so this function does nothing. The closest + * equivalent on Unix is that the session bus address is published by the + * dbus-launch tool, and unpublished automatically when the dbus-launch + * tool exits. + */ void _dbus_daemon_unpublish_session_bus_address (void) {