diff options
author | Colin Walters <walters@verbum.org> | 2008-05-27 22:56:00 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-04-28 13:12:48 -0400 |
commit | d847e353501f58e1b39b59c401347bcaf1e7d303 (patch) | |
tree | e30b7c125a284f0c9a75bff14de3c51814ad0f97 | |
parent | e5a76f43ed9901d095c9ac0c1df2ce2223392b9d (diff) | |
download | dbus-glib-d847e353501f58e1b39b59c401347bcaf1e7d303.tar.gz |
Bug 12505: Avoid receiving duplicate NameOwnerChanged (Dan Williams)
-rw-r--r-- | dbus/dbus-gproxy.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c index 7ce8378..83a983f 100644 --- a/dbus/dbus-gproxy.c +++ b/dbus/dbus-gproxy.c @@ -1232,8 +1232,17 @@ dbus_g_proxy_manager_filter (DBusConnection *connection, dbus_message_get_interface (message)); owner_list = g_hash_table_lookup (manager->proxy_lists, tri); - if (owner_list != NULL) - full_list = g_slist_concat (full_list, g_slist_copy (owner_list->proxies)); + if (owner_list != NULL) + { + GSList *elt; + + /* Ignore duplicates when adding to full_list */ + for (elt = owner_list->proxies; elt; elt = g_slist_next (elt)) + { + if (!g_slist_find (full_list, elt->data)) + full_list = g_slist_append (full_list, elt->data); + } + } g_free (tri); } } |