aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-19 21:30:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-19 21:30:23 +0800
commitd7612089c859f73dbafae2498104cf9329b51e9b (patch)
tree72d117f4e98583f4121d5318486ac68dbc09a676
parente35291afaace4f378dd34377cd976003735af47c (diff)
downloadgsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.tar
gsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.tar.gz
gsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.tar.bz2
gsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.tar.lz
gsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.tar.xz
gsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.tar.zst
gsoc2013-empathy-d7612089c859f73dbafae2498104cf9329b51e9b.zip
call cb with an error if dispatcher_chat_with_contact* fails
-rw-r--r--libempathy/empathy-dispatcher.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 8d91928f6..5cff9d842 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -1449,6 +1449,12 @@ empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
if (connection_data == NULL)
{
/* Connection has been invalidated */
+ if (callback != NULL)
+ {
+ GError error = { TP_DBUS_ERRORS, TP_DBUS_ERROR_PROXY_UNREFERENCED,
+ "Connection has been invalidated" };
+ callback (NULL, &error, user_data);
+ }
goto out;
}
@@ -1485,8 +1491,12 @@ dispatcher_chat_with_contact_id_cb (EmpathyTpContactFactory *factory,
if (error)
{
- /* FIXME: Should call data->callback with the error */
DEBUG ("Error: %s", error->message);
+
+ if (data->callback != NULL)
+ {
+ data->callback (NULL, error, data->user_data);
+ }
}
else
{