telepathy-mission-control: Comment that the first bus name we take is an initialization mutex

Simon McVittie smcv at kemper.freedesktop.org
Wed Jan 29 06:31:45 PST 2014


Module: telepathy-mission-control
Branch: master
Commit: 232c6e290bbb83418c63fb10a2d3412f6aa8b77d
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=232c6e290bbb83418c63fb10a2d3412f6aa8b77d

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Jan 29 14:21:21 2014 +0000

Comment that the first bus name we take is an initialization mutex

We need a mutex that will protect our account migration process
from other copies of MC running in parallel. If we don't take the
"main" name until later, then that name can't be our mutex.

Bug: related to https://bugs.freedesktop.org/show_bug.cgi?id=24000
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 src/mcd-service.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mcd-service.c b/src/mcd-service.c
index 17c94b0..cf3d05e 100644
--- a/src/mcd-service.c
+++ b/src/mcd-service.c
@@ -133,6 +133,10 @@ mcd_service_constructed (GObject *obj)
 {
     DEBUG ("called");
 
+    /* It's actually quite important that we request *a* bus name here,
+     * so we can use it as a mutex for loading and migrating accounts,
+     * all of which we want to have finished before we open up our main
+     * D-Bus API for business. (See also fd.o #24000) */
     mcd_service_obtain_bus_name (MCD_OBJECT (obj));
     mcd_debug_print_tree (obj);
 



More information about the telepathy-commits mailing list