[Telepathy-commits] [telepathy-salut/master] Added more debugging output.

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:11 PST 2008


20080729131422-8ed0e-2742080b894c490b220c93b406e518d7a249ef0d.gz
---
 src/salut-file-channel.c |   20 ++++++++++++++++----
 src/salut-ft-manager.c   |    2 ++
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index 010e6b3..f2c8cee 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -825,16 +825,28 @@ salut_file_channel_check_and_send (SalutFileChannel *channel)
   GError *error = NULL;
 
   if (G_STR_EMPTY (channel->priv->content_type))
-    return;
+    {
+      DEBUG ("ContentType not present; not starting file transfer");
+      return;
+    }
 
   if (G_STR_EMPTY (channel->priv->filename))
-    return;
+    {
+      DEBUG ("Filename property not present; not starting file transfer");
+      return;
+    }
 
   if (channel->priv->size == 0 && channel->priv->estimated_size == 0)
-    return;
+    {
+      DEBUG ("Size property not present; not starting file transfer");
+      return;
+    }
 
   if (G_STR_EMPTY (channel->priv->content_md5))
-    return;
+    {
+      DEBUG ("ContentMD5 property not present; not starting file transfer");
+      return;
+    }
 
   DEBUG ("Starting sending file transfer");
 
diff --git a/src/salut-ft-manager.c b/src/salut-ft-manager.c
index b9d5a0a..764fc99 100644
--- a/src/salut-ft-manager.c
+++ b/src/salut-ft-manager.c
@@ -275,6 +275,8 @@ salut_ft_manager_new_channel (SalutFtManager *mgr,
       return NULL;
     }
 
+  DEBUG ("%s channel requested", incoming ? "Incoming" : "Outgoing");
+
   state = incoming ? SALUT_FILE_TRANSFER_STATE_LOCAL_PENDING : SALUT_FILE_TRANSFER_STATE_REMOTE_PENDING;
   direction = incoming ? SALUT_FILE_TRANSFER_DIRECTION_INCOMING : SALUT_FILE_TRANSFER_DIRECTION_OUTGOING;
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list