tools: Set g_dbus_connection_new_for_address initialization flags

Otherwise private dbus connections fail with ""The connection is closed".
This commit is contained in:
Felipe Borges 2023-04-17 12:19:37 +02:00
parent 188c63a183
commit 86c54a6fdc

View File

@ -33,7 +33,7 @@ create_connection (int argc,
if (argc < 2)
return g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
else
return g_dbus_connection_new_for_address_sync (argv[1], 0, NULL, NULL, error);
return g_dbus_connection_new_for_address_sync (argv[1], G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION, NULL, NULL, error);
}
static gboolean