DBG("Export user service interface");
- server->priv->connection = connection;
- g_object_ref(server->priv->connection);
+ server->priv->connection = g_object_ref(connection);
server->priv->user_service =
gumd_dbus_user_service_adapter_new_with_connection (
self->priv->user_service = NULL;
self->priv->group_service = NULL;
self->priv->name_owner_id = 0;
+ self->priv->connection = NULL;
}
static gboolean
server->priv->user_service = NULL;
}
- if (server->priv->connection) {
- GIOStream *stream = g_dbus_connection_get_stream (server->priv->connection);
- if (stream) {
- DBG("g_io_stream_close '%p'", stream);
- g_io_stream_close (stream, NULL, NULL);
- }
- g_object_unref (server->priv->connection);
- server->priv->connection = NULL;
- }
-
if (server->priv->name_owner_id) {
g_bus_unown_name (server->priv->name_owner_id);
server->priv->name_owner_id = 0;
}
+ if (server->priv->connection) {
+ g_object_unref (server->priv->connection);
+ server->priv->connection = NULL;
+ }
+
return TRUE;
}