GDBusProxy: Also check signature when checking if signal is expected
authorDavid Zeuthen <davidz@redhat.com>
Mon, 28 Mar 2011 17:04:34 +0000 (13:04 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 28 Mar 2011 17:04:34 +0000 (13:04 -0400)
Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusproxy.c

index 2b76090a3496fb1927273f9f76e4a2cd01bebd4d..e0996e1141c4a63f1280c869867413e4b3d6612e 100644 (file)
@@ -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,