[glib] GDBusProxy: Also check signature when checking if signal is expected



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]