Merge lp:~larsu/indicator-messages/dont-unset-remote-for-same-pid into lp:indicator-messages/14.04

Proposed by Lars Karlitski
Status: Merged
Approved by: Charles Kerr
Approved revision: 394
Merged at revision: 395
Proposed branch: lp:~larsu/indicator-messages/dont-unset-remote-for-same-pid
Merge into: lp:indicator-messages/14.04
Diff against target: 18 lines (+5/-2)
1 file modified
src/im-application-list.c (+5/-2)
To merge this branch: bzr merge lp:~larsu/indicator-messages/dont-unset-remote-for-same-pid
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+192802@code.launchpad.net

Description of the change

Protect against processes calling Register() multiple times

Don't unnecessarily reset the application's state if the same process calls Register() more than once.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/im-application-list.c'
2--- src/im-application-list.c 2013-10-11 18:53:26 +0000
3+++ src/im-application-list.c 2013-10-27 00:51:15 +0000
4@@ -1163,9 +1163,12 @@
5
6 if (app->proxy)
7 name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (app->proxy));
8- g_warning ("replacing '%s' at %s with %s", id, name_owner, unique_bus_name);
9
10- im_application_list_unset_remote (app);
11+ if (g_strcmp0 (name_owner, unique_bus_name) != 0)
12+ {
13+ g_warning ("replacing '%s' at %s with %s", id, name_owner, unique_bus_name);
14+ im_application_list_unset_remote (app);
15+ }
16
17 g_free (name_owner);
18 }

Subscribers

People subscribed via source and target branches