mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 16:58:03 +02:00
Use a private system bus connection to properly handle
teardown and reconnect during server reset.
This commit is contained in:
parent
9fd9c35af0
commit
2681b50b44
1 changed files with 2 additions and 2 deletions
|
|
@ -85,7 +85,7 @@ teardown(void)
|
|||
* completeness. But then it gets awkward, given that you can't
|
||||
* guarantee that they'll be called ... */
|
||||
if (bus_info.connection)
|
||||
dbus_connection_unref(bus_info.connection);
|
||||
dbus_connection_close(bus_info.connection);
|
||||
|
||||
RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
|
||||
if (bus_info.fd != -1)
|
||||
|
|
@ -140,7 +140,7 @@ connect_to_bus(void)
|
|||
struct config_dbus_core_hook *hook;
|
||||
|
||||
dbus_error_init(&error);
|
||||
bus_info.connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error);
|
||||
bus_info.connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
|
||||
if (!bus_info.connection || dbus_error_is_set(&error)) {
|
||||
DebugF("[config/dbus-core] error connecting to system bus: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue