Commit 51bc5d4b authored by Lennart Poettering's avatar Lennart Poettering
Browse files

dbus: get rid of last non-private busses

parent c0bd0cf7
......@@ -36,7 +36,7 @@ int main(int argc, char *argv[]) {
goto finish;
}
if (!(bus = dbus_bus_get(DBUS_BUS_SYSTEM, &error))) {
if (!(bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error))) {
log_error("Failed to get D-Bus connection: %s", error.message);
goto finish;
}
......@@ -61,8 +61,10 @@ int main(int argc, char *argv[]) {
r = 0;
finish:
if (bus)
if (bus) {
dbus_connection_close(bus);
dbus_connection_unref(bus);
}
if (m)
dbus_message_unref(m);
......
......@@ -76,7 +76,7 @@ int bus_connect(DBusBusType t, DBusConnection **_bus, bool *private, DBusError *
*private = true;
} else {
if (!(bus = dbus_bus_get(t, error)))
if (!(bus = dbus_bus_get_private(t, error)))
return -EIO;
if (private)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment