[glib] GDBusProxy: Also check signature when checking if signal is expected
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GDBusProxy: Also check signature when checking if signal is expected
- Date: Mon, 28 Mar 2011 17:05:18 +0000 (UTC)
commit f516ebc57b8e075744fd1c653fba47191dfd3fba
Author: David Zeuthen <davidz redhat com>
Date: Mon Mar 28 13:04:34 2011 -0400
GDBusProxy: Also check signature when checking if signal is expected
Signed-off-by: David Zeuthen <davidz redhat com>
gio/gdbusproxy.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
index 2b76090..e0996e1 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]