summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-08-07 19:48:09 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-08-08 10:29:50 +0100
commitad4b94ecd7768bd952cdcba51fd7039f564e6765 (patch)
tree0162091c5551889c5b2990faee13162c2c719479 /server
parentfd24dd6521bf9a9bebfcbf0241b3b8129bc90e61 (diff)
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. Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53220
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am5
-rw-r--r--server/org.freedesktop.Telepathy.MissionControl5.service.in2
2 files changed, 5 insertions, 2 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
index ba734500..eb74a3cd 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -24,7 +24,10 @@ servicefile_DATA=org.freedesktop.Telepathy.MissionControl5.service \
org.freedesktop.Telepathy.AccountManager.service
%.service: %.service.in Makefile
- $(AM_V_GEN)sed -e 's![@]libexecdir[@]!$(libexecdir)!' $< > $@
+ $(AM_V_GEN)sed \
+ -e 's![@]libexecdir[@]!$(libexecdir)!' \
+ -e 's![@]bindir[@]!$(bindir)!' \
+ $< > $@
man8_MANS = mission-control-5.8
diff --git a/server/org.freedesktop.Telepathy.MissionControl5.service.in b/server/org.freedesktop.Telepathy.MissionControl5.service.in
index d91d4dd8..51f4dc17 100644
--- a/server/org.freedesktop.Telepathy.MissionControl5.service.in
+++ b/server/org.freedesktop.Telepathy.MissionControl5.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.Telepathy.MissionControl5
-Exec=@libexecdir@/mission-control-5
+Exec=@bindir@/mc-wait-for-name --activate org.freedesktop.Telepathy.AccountManager org.freedesktop.Telepathy.MissionControl5