From 29b65fa3237afe07cdf8acaa9d46c92dbe749fb2 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 30 Jul 2003 20:14:07 +0000 Subject: 2003-07-30 Havoc Pennington * dbus/dbus-bus.c (init_connections_unlocked): fix default system bus address to be abstract if we have abstract sockets * NEWS: update --- dbus/dbus-bus.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-bus.c') diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c index 6ab1eccc..8ff1298d 100644 --- a/dbus/dbus-bus.c +++ b/dbus/dbus-bus.c @@ -32,9 +32,14 @@ * @ingroup DBus * @brief Functions for communicating with the message bus * + * @todo right now the default address of the system bus is hardcoded, + * so if you change it in the global config file suddenly you have to + * set DBUS_SYSTEM_BUS_ADDRESS env variable. Might be nice if the + * client lib somehow read the config file, or if the bus on startup + * somehow wrote out its address to a well-known spot, but might also + * not be worth it. */ - /** * @defgroup DBusBusInternals Message bus APIs internals * @ingroup DBusInternals @@ -141,7 +146,11 @@ init_connections_unlocked (void) { /* Use default system bus address if none set in environment */ bus_connection_addresses[DBUS_BUS_SYSTEM] = +#ifdef HAVE_ABSTRACT_SOCKETS + _dbus_strdup ("unix:abstract=" DBUS_SYSTEM_BUS_PATH); +#else _dbus_strdup ("unix:path=" DBUS_SYSTEM_BUS_PATH); +#endif if (bus_connection_addresses[DBUS_BUS_SYSTEM] == NULL) return FALSE; } -- cgit