if (fd < 0)
{
DEBUG ("Failed to create socket, closing channel");
- tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL);
+ empathy_tp_file_cancel (tp_file);
return;
}
if (connect (fd, (struct sockaddr*) &addr, sizeof (addr)) < 0)
{
DEBUG ("Failed to connect socket, closing channel");
- tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL);
+ empathy_tp_file_cancel (tp_file);
close (fd);
return;
}
if (error)
{
DEBUG ("Error: %s", error->message);
- tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL);
+ empathy_tp_file_cancel (tp_file);
return;
}
tp_cli_channel_call_close (tp_file->priv->channel, -1, NULL, NULL, NULL, NULL);
- g_cancellable_cancel (tp_file->priv->cancellable);
+ if (tp_file->priv->cancellable != NULL)
+ g_cancellable_cancel (tp_file->priv->cancellable);
}
static void