summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2015-08-29 09:52:05 -0700
committerCosimo Cecchi <cosimoc@gnome.org>2015-08-29 09:53:04 -0700
commitcb5c096854c2ade3747c6100341893e11e2881b7 (patch)
tree729718621f80dceefdc7bccfe6de72c21d7ecf55
parent0268ca317e4c9c1f453041b6b10d58eda332329e (diff)
downloadgnome-keyring-cb5c096854c2ade3747c6100341893e11e2881b7.tar.gz
dbus: fix marshalling of GkdSecretSecret
We need to use g_variant_new_fixed_array(), as the parameter and value are not bytestrings. This fixes another regression from the GDBus port.
-rw-r--r--daemon/dbus/gkd-secret-secret.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/daemon/dbus/gkd-secret-secret.c b/daemon/dbus/gkd-secret-secret.c
index 691a5350..5a59c2e6 100644
--- a/daemon/dbus/gkd-secret-secret.c
+++ b/daemon/dbus/gkd-secret-secret.c
@@ -128,7 +128,6 @@ gkd_secret_secret_parse (GkdSecretService *service,
GVariant *
gkd_secret_secret_append (GkdSecretSecret *secret)
{
- GVariantBuilder builder;
const gchar *content_type = "text/plain";
const gchar *path;
GVariant *parameter, *value;
@@ -136,13 +135,12 @@ gkd_secret_secret_append (GkdSecretSecret *secret)
path = gkd_secret_dispatch_get_object_path (GKD_SECRET_DISPATCH (secret->session));
g_return_val_if_fail (path, NULL);
- g_variant_builder_init (&builder, G_VARIANT_TYPE ("ay"));
- g_variant_builder_add (&builder, "y", secret->parameter);
- parameter = g_variant_builder_end (&builder);
-
- g_variant_builder_init (&builder, G_VARIANT_TYPE ("ay"));
- g_variant_builder_add (&builder, "y", secret->value);
- value = g_variant_builder_end (&builder);
+ parameter = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
+ secret->parameter, secret->n_parameter,
+ sizeof (guchar));
+ value = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE,
+ secret->value, secret->n_value,
+ sizeof (guchar));
return g_variant_new ("(o@ay@ays)", path, parameter, value, content_type);
}