From f516ebc57b8e075744fd1c653fba47191dfd3fba Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Mon, 28 Mar 2011 13:04:34 -0400 Subject: [PATCH] GDBusProxy: Also check signature when checking if signal is expected Signed-off-by: David Zeuthen --- gio/gdbusproxy.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c index 2b76090a3..e0996e114 100644 --- a/gio/gdbusproxy.c +++ b/gio/gdbusproxy.c @@ -758,9 +758,17 @@ on_signal_received (GDBusConnection *connection, if (proxy->priv->expected_interface != NULL) { const GDBusSignalInfo *info; + GVariantType *expected_type; info = g_dbus_interface_info_lookup_signal (proxy->priv->expected_interface, signal_name); if (info == NULL) goto out; + expected_type = _g_dbus_compute_complete_signature (info->args); + if (!g_variant_type_equal (expected_type, g_variant_get_type (parameters))) + { + g_variant_type_free (expected_type); + goto out; + } + g_variant_type_free (expected_type); } g_signal_emit (proxy,