mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 23:28:54 +02:00
GDBusConnection: propagate error correctly if flags are inappropriate
Previously, this would fail the assertion "connection->initialization_error != NULL" after the label "out". Bug: https://bugzilla.gnome.org/show_bug.cgi?id=665067 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
@@ -2534,7 +2534,7 @@ initable_init (GInitable *initable,
|
|||||||
if ((connection->flags & G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER) ||
|
if ((connection->flags & G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER) ||
|
||||||
(connection->flags & G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS))
|
(connection->flags & G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS))
|
||||||
{
|
{
|
||||||
g_set_error_literal (error,
|
g_set_error_literal (&connection->initialization_error,
|
||||||
G_IO_ERROR,
|
G_IO_ERROR,
|
||||||
G_IO_ERROR_INVALID_ARGUMENT,
|
G_IO_ERROR_INVALID_ARGUMENT,
|
||||||
_("Unsupported flags encountered when constructing a client-side connection"));
|
_("Unsupported flags encountered when constructing a client-side connection"));
|
||||||
|
Reference in New Issue
Block a user