X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus.c;h=b92c7d0b99923cc739f7d224fcc3f03fca3bd435;hb=737563e4bb1606cae1dd0e9484f9e82da466fe76;hp=08aff1fd2b03a64a92e8cac3028b1f58baedca4b;hpb=92f303495868f7d6971b7f42c69f63cb0e2e0ebd;p=elogind.git diff --git a/src/core/dbus.c b/src/core/dbus.c index 08aff1fd2..b92c7d0b9 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -406,7 +406,7 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus dbus_error_free(&error); if (reply) { - if (!dbus_connection_send(connection, reply, NULL)) + if (!bus_maybe_send_reply(connection, message, reply)) goto oom; dbus_message_unref(reply); @@ -978,9 +978,8 @@ static DBusConnection* manager_bus_connect_private(Manager *m, DBusBusType type) } return connection; + fail: - if (connection) - dbus_connection_close(connection); dbus_error_free(&error); return NULL; } @@ -1054,7 +1053,7 @@ fail: static int bus_init_private(Manager *m) { DBusError error; int r; - const char *const external_only[] = { + static const char *const external_only[] = { "EXTERNAL", NULL };