diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-21 21:53:44 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-09-27 21:11:27 +0800 |
commit | a3d1d0df9e007c2d59c03ecaecf19321f60151c1 (patch) | |
tree | 4167edd85317bb58972433617ad1a10d499247c6 /libempathy/empathy-ft-handler.c | |
parent | 88fc949d3521c77a8ab9e86f8366f670b940bafb (diff) | |
download | gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.tar gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.tar.gz gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.tar.bz2 gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.tar.lz gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.tar.xz gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.tar.zst gsoc2013-empathy-a3d1d0df9e007c2d59c03ecaecf19321f60151c1.zip |
EmpathyTpFile: inherit from TpFileTransferChannel
https://bugzilla.gnome.org/show_bug.cgi?id=658245
Diffstat (limited to 'libempathy/empathy-ft-handler.c')
-rw-r--r-- | libempathy/empathy-ft-handler.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c index 8654bdd20..83557d480 100644 --- a/libempathy/empathy-ft-handler.c +++ b/libempathy/empathy-ft-handler.c @@ -725,7 +725,7 @@ ft_handler_create_channel_cb (GObject *source, EmpathyFTHandler *handler = user_data; EmpathyFTHandlerPriv *priv = GET_PRIV (handler); GError *error = NULL; - TpChannel *channel = NULL; + TpChannel *channel; DEBUG ("Dispatcher create channel CB"); @@ -741,18 +741,16 @@ ft_handler_create_channel_cb (GObject *source, { emit_error_signal (handler, error); + g_clear_object (&channel); g_error_free (error); - goto out; + return; } - priv->tpfile = empathy_tp_file_new (channel); + priv->tpfile = EMPATHY_TP_FILE (channel); empathy_tp_file_offer (priv->tpfile, priv->gfile, priv->cancellable, ft_transfer_progress_callback, handler, ft_transfer_operation_callback, handler); - -out: - tp_clear_object (&channel); } static void @@ -1365,7 +1363,6 @@ empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file, gpointer user_data) { EmpathyFTHandler *handler; - TpChannel *channel; CallbacksData *data; g_return_if_fail (EMPATHY_IS_TP_FILE (tp_file)); @@ -1373,14 +1370,12 @@ empathy_ft_handler_new_incoming (EmpathyTpFile *tp_file, handler = g_object_new (EMPATHY_TYPE_FT_HANDLER, "tp-file", tp_file, NULL); - g_object_get (tp_file, "channel", &channel, NULL); - data = g_slice_new0 (CallbacksData); data->callback = callback; data->user_data = user_data; data->handler = g_object_ref (handler); - tp_cli_dbus_properties_call_get_all (channel, + tp_cli_dbus_properties_call_get_all (tp_file, -1, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, channel_get_all_properties_cb, data, NULL, G_OBJECT (handler)); } |