[telepathy-mission-control/master] McdDispatchOperation: when unable to emit Finished or ChannelLost, debug why

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Oct 28 11:06:18 PDT 2009


---
 src/mcd-dispatch-operation.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index f5f7f21..d122763 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -588,8 +588,11 @@ _mcd_dispatch_operation_finish (McdDispatchOperation *operation)
     }
     else
     {
-        DEBUG ("%s/%p not finishing just yet", priv->unique_name,
-               operation);
+        DEBUG ("%s/%p not finishing just yet: "
+               "waiting for %" G_GSIZE_FORMAT " observers, "
+               "%" G_GSIZE_FORMAT " approvers",
+               priv->unique_name, operation,
+               priv->observers_pending, priv->ado_pending);
     }
 }
 
@@ -1300,8 +1303,11 @@ _mcd_dispatch_operation_lose_channel (McdDispatchOperation *self,
     {
         /* We're still invoking approvers, so we're not allowed to talk
          * about it right now. Instead, save the signal for later. */
-        DEBUG ("%s/%p not losing channel %s just yet", self->priv->unique_name,
-               self, object_path);
+        DEBUG ("%s/%p not losing channel %s just yet: "
+               "waiting for %" G_GSIZE_FORMAT " observers, "
+               "%" G_GSIZE_FORMAT " approvers",
+               self->priv->unique_name, self, object_path,
+               self->priv->observers_pending, self->priv->ado_pending);
         self->priv->lost_channels =
             g_list_prepend (self->priv->lost_channels,
                             g_object_ref (channel));
@@ -1377,6 +1383,14 @@ _mcd_dispatch_operation_check_finished (McdDispatchOperation *self)
             mcd_dispatch_operation_actually_finish (self);
         }
     }
+    else if (self->priv->wants_to_finish)
+    {
+        DEBUG ("%s/%p still unable to finish: "
+               "waiting for %" G_GSIZE_FORMAT " observers, "
+               "%" G_GSIZE_FORMAT " approvers",
+               self->priv->unique_name, self,
+               self->priv->observers_pending, self->priv->ado_pending);
+    }
 }
 
 static void
-- 
1.5.6.5




More information about the telepathy-commits mailing list