aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-ft-handler.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-15 06:46:26 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:49:57 +0800
commit0a96c62150fe235167c291ead9a4f180fd80109e (patch)
tree3420dd852451992e710efa227beb5f63e4fe5cc6 /libempathy/empathy-ft-handler.c
parent997c9dabb5fd8ea6631a37a80576d312b0da56d5 (diff)
downloadgsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.gz
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.bz2
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.lz
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.xz
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.zst
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.zip
Handle construction errors
Handle errors that may arise when constructing the handler from the factory.
Diffstat (limited to 'libempathy/empathy-ft-handler.c')
-rw-r--r--libempathy/empathy-ft-handler.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index b139fa70e..1f6fd86d2 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -913,6 +913,9 @@ out:
}
else
{
+ if (!g_cancellable_is_cancelled (priv->cancellable))
+ g_cancellable_cancel (priv->cancellable);
+
cb_data->callback (NULL, error, cb_data->user_data);
g_error_free (error);
g_object_unref (cb_data->handler);
@@ -934,6 +937,9 @@ contact_factory_contact_cb (EmpathyTpContactFactory *factory,
if (error != NULL)
{
+ if (!g_cancellable_is_cancelled (priv->cancellable))
+ g_cancellable_cancel (priv->cancellable);
+
cb_data->callback (NULL, (GError *) error, cb_data->user_data);
g_object_unref (handler);
return;
@@ -959,6 +965,9 @@ channel_get_all_properties_cb (TpProxy *proxy,
if (error != NULL)
{
+ if (!g_cancellable_is_cancelled (priv->cancellable))
+ g_cancellable_cancel (priv->cancellable);
+
cb_data->callback (NULL, (GError *) error, cb_data->user_data);
g_object_unref (handler);
return;