]> git.0d.be Git - empathy.git/commitdiff
Add some debug messages
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>
Thu, 14 May 2009 17:57:17 +0000 (19:57 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 1 Jun 2009 15:49:57 +0000 (17:49 +0200)
libempathy/empathy-ft-handler.c

index be1c1a098b3792a9528e4febea7155510888d048..b139fa70e0f2057ca4cc6b71f0b516da9221f6c6 100644 (file)
@@ -659,11 +659,21 @@ hash_job_done (gpointer user_data)
       if (g_strcmp0 (g_checksum_get_string (hash_data->checksum),
                      priv->content_hash))
         {
+          DEBUG ("Hash mismatch when checking incoming handler: "
+                 "received %s, calculated %s", priv->content_hash,
+                 g_checksum_get_string (hash_data->checksum));
+
           hash_data->error = g_error_new_literal (EMPATHY_FT_ERROR_QUARK,
               EMPATHY_FT_ERROR_HASH_MISMATCH,
               _("The hash of the received file and the sent one do not match"));
           goto cleanup;
         }
+      else
+        {
+          DEBUG ("Hash verification matched, received %s, calculated %s",
+                 priv->content_hash,
+                 g_checksum_get_string (hash_data->checksum));
+        }
     }
   else
     {
@@ -767,6 +777,8 @@ do_hash_job_incoming (GIOSchedulerJob *job,
   EmpathyFTHandlerPriv *priv = GET_PRIV (handler);
   GError *error = NULL;
 
+  DEBUG ("checking integrity for incoming handler");
+
   /* need to get the stream first */
   hash_data->stream =
     G_INPUT_STREAM (g_file_read (priv->gfile, cancellable, &error));