aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-ft-handler.c2
-rw-r--r--libempathy/empathy-tp-file.c23
2 files changed, 14 insertions, 11 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 4a1403875..e2172bcd5 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -694,6 +694,8 @@ ft_handler_check_if_allowed (EmpathyFTHandler *handler)
TP_IFACE_CHANNEL ".TargetHandle"))
res = FALSE;
+ DEBUG ("check if FT allowed: %s", res ? "True" : "False");
+
g_object_unref (dispatcher);
return res;
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index a5af58b1e..6a2887251 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -149,11 +149,11 @@ ft_operation_close_clean (EmpathyTpFile *tp_file)
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- DEBUG ("FT operation close clean");
-
if (priv->is_closed)
return;
+ DEBUG ("FT operation close clean");
+
priv->is_closed = TRUE;
if (priv->op_callback != NULL)
@@ -166,11 +166,11 @@ ft_operation_close_with_error (EmpathyTpFile *tp_file,
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- DEBUG ("FT operation close with error %s", error->message);
-
if (priv->is_closed)
return;
+ DEBUG ("FT operation close with error %s", error->message);
+
priv->is_closed = TRUE;
/* close the channel if it's not cancelled already */
@@ -191,10 +191,10 @@ splice_stream_ready_cb (GObject *source,
tp_file = user_data;
- DEBUG ("Splice stream ready cb");
-
g_output_stream_splice_finish (G_OUTPUT_STREAM (source), res, &error);
+ DEBUG ("Splice stream ready cb, error %p", error);
+
if (error != NULL)
{
ft_operation_close_with_error (tp_file, error);
@@ -520,12 +520,12 @@ channel_closed_cb (TpChannel *proxy,
{
EmpathyTpFile *tp_file = EMPATHY_TP_FILE (weak_object);
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- gboolean *cancel = user_data;
+ gboolean cancel = GPOINTER_TO_INT (user_data);
- DEBUG ("Channel is closed");
+ DEBUG ("Channel is closed, should cancel %s", cancel ? "True" : "False");
if (priv->cancellable != NULL &&
- !g_cancellable_is_cancelled (priv->cancellable) && *cancel)
+ !g_cancellable_is_cancelled (priv->cancellable) && cancel)
g_cancellable_cancel (priv->cancellable);
}
@@ -535,10 +535,11 @@ close_channel_internal (EmpathyTpFile *tp_file,
{
EmpathyTpFilePriv *priv = GET_PRIV (tp_file);
- DEBUG ("Closing channel..");
+ DEBUG ("Closing channel, should cancel %s", cancel ?
+ "True" : "False");
tp_cli_channel_call_close (priv->channel, -1,
- channel_closed_cb, &cancel, NULL, G_OBJECT (tp_file));
+ channel_closed_cb, GINT_TO_POINTER (cancel), NULL, G_OBJECT (tp_file));
}
/* GObject methods */