summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Dasmohapatra <vivek@collabora.co.uk>2011-03-03 20:20:22 +0000
committerVivek Dasmohapatra <vivek@collabora.co.uk>2011-03-03 20:20:22 +0000
commit0783ceb306446d31e7222b44f7933408f7ae3f5b (patch)
tree0dd8374b15fe6c17e86e7d617eaa181404af3f4b
parent64b3054d3de4bcef9d0f5d6d81fe6fdfcf21c511 (diff)
downloadtelepathy-mission-control-0783ceb306446d31e7222b44f7933408f7ae3f5b.tar.gz
Explain how _sso_updated works; Rename 'key' to 'unused' to avoid confusion.
-rw-r--r--src/mcd-account-manager-sso.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mcd-account-manager-sso.c b/src/mcd-account-manager-sso.c
index 1f1f8cdc..82cbeab1 100644
--- a/src/mcd-account-manager-sso.c
+++ b/src/mcd-account-manager-sso.c
@@ -402,8 +402,17 @@ static void unwatch_account_keys (McdAccountManagerSso *sso,
g_hash_table_remove (sso->watches, watch_key);
}
-static void _sso_updated (AgAccount * account,
- const gchar *key,
+/* There are two types of ag watch: ag_account_watch_key and *
+ * ag_account_watch_dir. _key passees us the watched key when invoking this *
+ * callback, dir watches only a prefix, and passes the watched prefix *
+ * (not the actual updated setting) - we now watch with _dir since _key *
+ * doesn't allow us to watch for keys-that-are-not-set at creation time *
+ * (since those cannot be known in advance): This means that in this *
+ * callback we must compare what we have in MC with what's in AG and issue *
+ * update notices accordingly (and remember to handle deleted keys). *
+ * It also means the const gchar *what-was-updated parameter is not useful */
+static void _sso_updated (AgAccount *account,
+ const gchar *unused,
gpointer data)
{
WatchData *wd = data;