[gnome-keyring/wip/cosimoc/gdbus-fixes: 7/11] dbus: fix marshalling of OpenSession result
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/cosimoc/gdbus-fixes: 7/11] dbus: fix marshalling of OpenSession result
- Date: Sat, 29 Aug 2015 16:55:20 +0000 (UTC)
commit 0268ca317e4c9c1f453041b6b10d58eda332329e
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Aug 28 23:43:11 2015 -0700
dbus: fix marshalling of OpenSession result
We should use g_variant_new_fixed_array() in this case, as what we have
is not a bytestring.
Fixes a regression from the GDBus port.
daemon/dbus/gkd-secret-session.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-session.c b/daemon/dbus/gkd-secret-session.c
index 0108ac0..08d47c4 100644
--- a/daemon/dbus/gkd-secret-session.c
+++ b/daemon/dbus/gkd-secret-session.c
@@ -226,11 +226,9 @@ aes_negotiate (GkdSecretSession *self,
take_session_key (self, key, CKM_AES_CBC_PAD);
if (output_variant != NULL) {
- GVariantBuilder builder;
-
- g_variant_builder_init (&builder, G_VARIANT_TYPE ("ay"));
- g_variant_builder_add (&builder, "y", (const gchar *) output);
- *output_variant = g_variant_new_variant (g_variant_builder_end (&builder));
+ *output_variant = g_variant_new_variant (g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
+ output, n_output,
+ sizeof (guchar)));
}
if (result != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]