[jsonrpc-glib] message: handle unboxing a{sv} messages
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jsonrpc-glib] message: handle unboxing a{sv} messages
- Date: Wed, 25 Apr 2018 04:19:02 +0000 (UTC)
commit 22596c53bd829c9c6ee249850d9d87b5f2ab4ac8
Author: Christian Hergert <chergert redhat com>
Date: Tue Apr 24 21:19:39 2018 -0700
message: handle unboxing a{sv} messages
src/jsonrpc-message.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/jsonrpc-message.c b/src/jsonrpc-message.c
index c335dd4..19e4704 100644
--- a/src/jsonrpc-message.c
+++ b/src/jsonrpc-message.c
@@ -612,12 +612,16 @@ gboolean
jsonrpc_message_parse (GVariant *message,
...)
{
+ g_autoptr(GVariant) unboxed = NULL;
gboolean ret;
va_list args;
if (message == NULL)
return FALSE;
+ if (g_variant_is_of_type (message, G_VARIANT_TYPE_VARIANT))
+ message = unboxed = g_variant_get_variant (message);
+
if (!g_variant_is_of_type (message, G_VARIANT_TYPE ("a{sv}")))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]