use tp_account_channel_request_set_file_transfer_hash()
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 25 Feb 2014 16:30:31 +0000 (17:30 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 26 Feb 2014 10:55:39 +0000 (11:55 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=725070

libempathy/empathy-ft-handler.c

index 708f3b4..367e946 100644 (file)
@@ -907,9 +907,8 @@ hash_job_done (gpointer user_data)
       /* set the checksum in the request...
        * org.freedesktop.Telepathy.Channel.Type.FileTransfer.ContentHash
        */
-      tp_account_channel_request_set_request_property (priv->request,
-          TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_HASH,
-          g_variant_new_string (g_checksum_get_string (hash_data->checksum)));
+      tp_account_channel_request_set_file_transfer_hash (priv->request,
+          TP_FILE_HASH_TYPE_MD5, g_checksum_get_string (hash_data->checksum));
     }
 
 cleanup:
@@ -1047,10 +1046,6 @@ ft_handler_read_async_cb (GObject *source,
   /* FIXME: MD5 is the only ContentHashType supported right now */
   hash_data->checksum = g_checksum_new (G_CHECKSUM_MD5);
 
-  tp_account_channel_request_set_request_property (priv->request,
-      TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_CONTENT_HASH_TYPE,
-      g_variant_new_uint32 (TP_FILE_HASH_TYPE_MD5));
-
   g_signal_emit (handler, signals[HASHING_STARTED], 0);
 
   g_io_scheduler_push_job (do_hash_job, hash_data, NULL,