diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-05-15 01:57:17 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-06-01 23:49:57 +0800 |
commit | 434bbd9419c2297bad034ea19adafdb1281bf18c (patch) | |
tree | e8c0e2e3dc0b6073734d344c10505f1167530d95 /libempathy/empathy-ft-handler.c | |
parent | 94e382478366624bb9c198e349fd1dd6c7b9cf6d (diff) | |
download | gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.tar gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.tar.gz gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.tar.bz2 gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.tar.lz gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.tar.xz gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.tar.zst gsoc2013-empathy-434bbd9419c2297bad034ea19adafdb1281bf18c.zip |
Add some debug messages
Diffstat (limited to 'libempathy/empathy-ft-handler.c')
-rw-r--r-- | libempathy/empathy-ft-handler.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c index be1c1a098..b139fa70e 100644 --- a/libempathy/empathy-ft-handler.c +++ b/libempathy/empathy-ft-handler.c @@ -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)); |