[Pkg-telepathy-commits] [telepathy-mission-control-6] 255/280: McdAccountManager: if an account is async-added during setup, wait for it
Simon McVittie
smcv at debian.org
Thu Mar 27 20:07:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.
commit 5090a5d462bfaa62300fa0526c043f60759306a6
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Feb 5 12:40:34 2014 +0000
McdAccountManager: if an account is async-added during setup, wait for it
Previously, we'd only wait for accounts added in mcd_storage_load()
to become ready.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
src/mcd-account-manager.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 593e698..489de45 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -100,6 +100,7 @@ typedef struct
McpAccountStorage *storage_plugin;
McdAccount *account;
gint account_lock;
+ gboolean holds_setup_lock;
} McdLoadAccountsData;
typedef struct
@@ -296,6 +297,12 @@ created_cb (GObject *storage_plugin_obj,
lad->storage_plugin = g_object_ref (plugin);
lad->account_lock = 1; /* released at the end of this function */
lad->account = g_object_ref (account);
+
+ if (self->priv->setup_lock > 0)
+ {
+ lad->holds_setup_lock = TRUE;
+ self->priv->setup_lock++;
+ }
}
else
{
@@ -1132,6 +1139,9 @@ release_load_accounts_lock (McdLoadAccountsData *lad)
if (lad->account_lock == 0)
{
+ if (lad->holds_setup_lock)
+ release_setup_lock (lad->account_manager);
+
g_object_unref (lad->account_manager);
g_object_unref (lad->storage_plugin);
g_object_unref (lad->account);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git
More information about the Pkg-telepathy-commits
mailing list