[Pkg-telepathy-commits] [telepathy-mission-control-6] 229/280: McdAccount: improve debug output for account validity

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:27 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 3c32422dfcdcfcd16f106b7a5107cbe35be93e36
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon Jan 27 20:16:33 2014 +0000

    McdAccount: improve debug output for account validity
---
 src/mcd-account.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/src/mcd-account.c b/src/mcd-account.c
index 6253a7e..28e3602 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -315,6 +315,20 @@ mcd_account_loaded (McdAccount *account)
     g_return_if_fail (!account->priv->loaded);
     account->priv->loaded = TRUE;
 
+    if (account->priv->invalid_reason == NULL)
+    {
+        DEBUG ("account %s is now loaded and valid",
+               account->priv->unique_name);
+    }
+    else
+    {
+        DEBUG ("account %s is now loaded, but not valid: %s #%d: %s",
+               account->priv->unique_name,
+               g_quark_to_string (account->priv->invalid_reason->domain),
+               account->priv->invalid_reason->code,
+               account->priv->invalid_reason->message);
+    }
+
     /* invoke all the callbacks */
     g_object_ref (account);
 
@@ -799,10 +813,29 @@ _mcd_account_load (McdAccount *account, McdAccountLoadCb callback,
                    gpointer user_data)
 {
     if (account->priv->loaded)
+    {
+        if (account->priv->invalid_reason == NULL)
+        {
+            DEBUG ("account %s already loaded and valid",
+                   account->priv->unique_name);
+        }
+        else
+        {
+            DEBUG ("account %s already loaded, but not valid: %s #%d: %s",
+                   account->priv->unique_name,
+                   g_quark_to_string (account->priv->invalid_reason->domain),
+                   account->priv->invalid_reason->code,
+                   account->priv->invalid_reason->message);
+        }
+
         callback (account, NULL, user_data);
+    }
     else
+    {
+        DEBUG ("account %s not yet loaded", account->priv->unique_name);
         _mcd_object_call_when_ready (account, account_ready_quark,
                                      (McdReadyCb)callback, user_data);
+    }
 }
 
 static void

-- 
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