[glib] Fixes GB#635187: Always unbox GVariant parameter received via dbus for an action
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fixes GB#635187: Always unbox GVariant parameter received via dbus for an action
- Date: Mon, 29 Nov 2010 13:06:53 +0000 (UTC)
commit 98bfc8afdaabffe4b63215727a580a139b7f07db
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Nov 18 18:00:57 2010 +0100
Fixes GB#635187: Always unbox GVariant parameter received via dbus for an action
gio/gapplicationimpl-dbus.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c
index 1aaa3b8..c9f4306 100644
--- a/gio/gapplicationimpl-dbus.c
+++ b/gio/gapplicationimpl-dbus.c
@@ -354,17 +354,21 @@ g_application_impl_actions_method_call (GDBusConnection *connection,
GVariant *platform_data;
GVariantIter *param;
GVariant *parameter;
+ GVariant *unboxed_parameter;
g_variant_get (parameters, "(&sav a{sv})",
&action_name, ¶m, &platform_data);
parameter = g_variant_iter_next_value (param);
+ unboxed_parameter = parameter ? g_variant_get_variant (parameter) : NULL;
g_variant_iter_free (param);
class->before_emit (impl->app, platform_data);
- g_action_group_activate_action (action_group, action_name, parameter);
+ g_action_group_activate_action (action_group, action_name, unboxed_parameter);
class->after_emit (impl->app, platform_data);
g_variant_unref (platform_data);
+ if (unboxed_parameter)
+ g_variant_unref (unboxed_parameter);
if (parameter)
g_variant_unref (parameter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]