Bug 623815 – Don't check sender for GDBusProxy objects where name is not set

Based on a patch from Peng Huang <shawn.p.huang@gmail.com>, thanks!

https://bugzilla.gnome.org/show_bug.cgi?id=623815

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2010-07-14 11:14:58 -04:00
parent 8a2e7d371f
commit 497edd8b40
2 changed files with 69 additions and 7 deletions

View File

@@ -737,7 +737,7 @@ on_signal_received (GDBusConnection *connection,
if (!proxy->priv->initialized)
goto out;
if (g_strcmp0 (sender_name, proxy->priv->name_owner) != 0)
if (proxy->priv->name_owner != NULL && g_strcmp0 (sender_name, proxy->priv->name_owner) != 0)
goto out;
g_signal_emit (proxy,
@@ -778,7 +778,7 @@ on_properties_changed (GDBusConnection *connection,
if (!proxy->priv->initialized)
goto out;
if (g_strcmp0 (sender_name, proxy->priv->name_owner) != 0)
if (proxy->priv->name_owner != NULL && g_strcmp0 (sender_name, proxy->priv->name_owner) != 0)
goto out;
if (!g_variant_is_of_type (parameters, G_VARIANT_TYPE ("(sa{sv}as)")))