From 6361bb3525cbcacb819128dd24eff2b7ec581c1a Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Sat, 26 Oct 2013 16:58:48 -0400 Subject: Protect against processes calling Register() multiple times Don't unnecessarily reset the application's state if the same process calls Register() more than once. --- src/im-application-list.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/im-application-list.c b/src/im-application-list.c index 8e59dcb..d285fda 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -1163,9 +1163,12 @@ im_application_list_set_remote (ImApplicationList *list, if (app->proxy) name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (app->proxy)); - g_warning ("replacing '%s' at %s with %s", id, name_owner, unique_bus_name); - im_application_list_unset_remote (app); + if (g_strcmp0 (name_owner, unique_bus_name) != 0) + { + g_warning ("replacing '%s' at %s with %s", id, name_owner, unique_bus_name); + im_application_list_unset_remote (app); + } g_free (name_owner); } -- cgit v1.2.3