mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
GDBus: Make message serialization routines take capabilities param
This is needed to e.g. allow encoding maybe types (once we add G_DBUS_CAPABILITY_FLAGS_MAYBE_TYPES) if, and only if, that capability has been negotiated with the peer (via authentication).
This commit is contained in:
@@ -522,6 +522,7 @@ check_serialization (GVariant *value,
|
||||
error = NULL;
|
||||
blob = g_dbus_message_to_blob (message,
|
||||
&blob_size,
|
||||
G_DBUS_CAPABILITY_FLAGS_NONE,
|
||||
&error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (blob != NULL);
|
||||
@@ -555,7 +556,10 @@ check_serialization (GVariant *value,
|
||||
/* Then serialize back and check that the body is identical */
|
||||
|
||||
error = NULL;
|
||||
recovered_message = g_dbus_message_new_from_blob (blob, blob_size, &error);
|
||||
recovered_message = g_dbus_message_new_from_blob (blob,
|
||||
blob_size,
|
||||
G_DBUS_CAPABILITY_FLAGS_NONE,
|
||||
&error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (recovered_message != NULL);
|
||||
g_assert (g_dbus_message_get_body (recovered_message) != NULL);
|
||||
|
Reference in New Issue
Block a user