summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-12-07 16:04:01 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2010-12-13 10:53:45 +0000
commit1e4a7475948a7b6d73fcb1654c1eb0d6498cc95a (patch)
tree1fc3c6c65f80921a450017cee827a33da67656c8
parent7570666e34f4f051f36926c8fb3b9a6d998e5d82 (diff)
BaseClient.ObserveChannels: handle broken connection paths
Previously, if someone passed an invalid connection path to ObserveChannels, tp-glib wouldn't pass the call up to the application, but nor would it return an error from the method. This manifested itself in the logger failing to return (or indeed log messages) when I hit <https://bugs.freedesktop.org/show_bug.cgi?id=32184>.
-rw-r--r--telepathy-glib/base-client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index af33f43b9..16ef3b401 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -1482,7 +1482,10 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
connection = tp_account_ensure_connection (account, connection_path);
if (connection == NULL)
{
- DEBUG ("Failed to create TpConnection");
+ g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ "Connection %s doesn't seem to exist. (Maybe the CM doesn't own "
+ "the corresponding bus name?)", connection_path);
+ DEBUG ("Failed to create TpConnection: %s", error->message);
goto out;
}