Bug 53220 - when racing to activate o.fd.T.MC5 and o.fd.T.AM, one or both fail
Summary: when racing to activate o.fd.T.MC5 and o.fd.T.AM, one or both fail
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2012-08-07 18:59 UTC by Simon McVittie
Modified: 2012-08-08 09:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Avoid race between Mission Control's two names by having one wait for the other (6.08 KB, patch)
2012-08-07 18:59 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2012-08-07 18:59:16 UTC
Created attachment 65246 [details] [review]
Avoid race between Mission Control's two names by having one  wait for the other

If you do:

dbus-send --dest=org.freedesktop.Telepathy.MissionControl5 \
  --type=method_call --print-reply / org.freedesktop.DBus.Peer.Ping & \
dbus-send --dest=org.freedesktop.Telepathy.AccountManager \
--type=method_call --print-reply / org.freedesktop.DBus.Peer.Ping

then one or both of the calls will fail because the executable claims
one of its bus names, but can't get the other, and exits 1.

By making one wait for the other, we get the desired behaviour.
I've made activating MissionControl5 wait for AccountManager because
in MC's current implementation AccountManager is taken last (Bug #24000).
Comment 1 Simon McVittie 2012-08-07 19:02:04 UTC
(In reply to comment #0)
> If you do:
> 
> [some stuff with dbus-send]

Forgot to mention the prerequisite: MC is not already running.
Comment 2 Jonny Lamb 2012-08-08 08:18:12 UTC
Interesting! Your patch looks fine.
Comment 3 Simon McVittie 2012-08-08 09:42:30 UTC
Thanks, fixed in git for 5.12.2 and 5.13.1.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.