{
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)
{
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 */
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);
{
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);
}
{
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 */