aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-18 17:27:23 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-18 17:46:02 +0800
commit46657275627702864348674f8c6397df922d7d45 (patch)
tree95242c414f1a045be4b15facd3398ad49d62f735
parente5485f513925ba7bc9baebbf7bed6eadf8e906f3 (diff)
downloadgsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.tar
gsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.tar.gz
gsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.tar.bz2
gsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.tar.lz
gsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.tar.xz
gsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.tar.zst
gsoc2013-empathy-46657275627702864348674f8c6397df922d7d45.zip
common_checks: tell the truth in debug messages
It's really confusing to read a "Can't handle.." error while it's actually an observe error.
-rw-r--r--libempathy/empathy-auth-factory.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c
index f60c76dd6..a3b01e0cd 100644
--- a/libempathy/empathy-auth-factory.c
+++ b/libempathy/empathy-auth-factory.c
@@ -185,9 +185,9 @@ common_checks (EmpathyAuthFactory *self,
*/
if (g_list_length (channels) != 1)
{
- g_set_error_literal (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "Can't handle more than one ServerTLSConnection or ServerAuthentication "
- "channel for the same connection.");
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
+ "Can't %s more than one ServerTLSConnection or ServerAuthentication "
+ "channel for the same connection.", observe ? "observe" : "handle");
return FALSE;
}
@@ -205,8 +205,9 @@ common_checks (EmpathyAuthFactory *self,
EMP_IFACE_QUARK_CHANNEL_TYPE_SERVER_TLS_CONNECTION)
{
g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "Can only handle ServerTLSConnection or ServerAuthentication channels, "
- "this was a %s channel", tp_channel_get_channel_type (channel));
+ "Can only %s ServerTLSConnection or ServerAuthentication channels, "
+ "this was a %s channel", observe ? "observe" : "handle",
+ tp_channel_get_channel_type (channel));
return FALSE;
}
@@ -216,8 +217,9 @@ common_checks (EmpathyAuthFactory *self,
TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION
&& priv->sasl_handler != NULL)
{
- g_set_error_literal (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "Can't handle more than one ServerAuthentication channel at one time");
+ g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
+ "Can't %s more than one ServerAuthentication channel at one time",
+ observe ? "observe" : "handle");
return FALSE;
}