From 7cb242a20728f515058468cbc3ffab111785f53e Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Fri, 21 Nov 2008 16:17:00 +0000 Subject: Do not set the MD5 hash of the file when sending. (Jonny Lamb) Signed-off-by: Jonny Lamb svn path=/trunk/; revision=1787 --- libempathy/empathy-utils.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index ac84953a9..1a33328a4 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -795,11 +795,6 @@ empathy_send_file (EmpathyContact *contact, GValue value = { 0 }; gchar *filename; - /* for getting ContentMD5 */ - gsize checksum_length; - gchar *checksum_data; - gchar *checksum_hex; - g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL); g_return_val_if_fail (G_IS_FILE (gfile), NULL); @@ -852,29 +847,6 @@ empathy_send_file (EmpathyContact *contact, &value, NULL, NULL); g_value_reset (&value); - - if (g_file_get_contents (g_file_get_path (gfile), - &checksum_data, &checksum_length, &error)) { - - checksum_hex = g_compute_checksum_for_data (G_CHECKSUM_MD5, - (guchar *) checksum_data, - (gssize) checksum_length); - g_free (checksum_data); - DEBUG ("Got a checksum: %s", checksum_hex); - } else { - DEBUG ("Couldn't get file contents for checksum: %s", - error ? error->message : "No error given"); - g_clear_error (&error); - checksum_hex = ""; - } - - g_value_set_string (&value, checksum_hex); - g_free (checksum_hex); - tp_cli_dbus_properties_run_set (TP_PROXY (channel), - -1, EMP_IFACE_CHANNEL_TYPE_FILE, "ContentMD5", - &value, NULL, NULL); - g_value_reset (&value); - g_value_set_string (&value, g_file_info_get_content_type (info)); tp_cli_dbus_properties_run_set (TP_PROXY (channel), -1, EMP_IFACE_CHANNEL_TYPE_FILE, "ContentType", -- cgit v1.2.3