aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-18 17:23:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-18 17:46:01 +0800
commite5485f513925ba7bc9baebbf7bed6eadf8e906f3 (patch)
treedb9fdc5e27358d2e0308ed46b6a25e264faa9932
parent310801b1c9417d242a6d584f0dcc01878552f77f (diff)
downloadgsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.tar
gsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.tar.gz
gsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.tar.bz2
gsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.tar.lz
gsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.tar.xz
gsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.tar.zst
gsoc2013-empathy-e5485f513925ba7bc9baebbf7bed6eadf8e906f3.zip
common_checks: rename must_be_sasl arg to observe
It was things clearer and easier to understand.
-rw-r--r--libempathy/empathy-auth-factory.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c
index 4daf1b17c..f60c76dd6 100644
--- a/libempathy/empathy-auth-factory.c
+++ b/libempathy/empathy-auth-factory.c
@@ -170,7 +170,7 @@ server_sasl_handler_ready_cb (GObject *source,
static gboolean
common_checks (EmpathyAuthFactory *self,
GList *channels,
- gboolean must_be_sasl,
+ gboolean observe,
GError **error)
{
EmpathyAuthFactoryPriv *priv = GET_PRIV (self);
@@ -197,7 +197,10 @@ common_checks (EmpathyAuthFactory *self,
if (tp_channel_get_channel_type_id (channel) !=
TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION)
{
- if (must_be_sasl
+ /* If we are observing we care only about ServerAuthentication channels.
+ * If we are handling we care about ServerAuthentication and
+ * ServerTLSConnection channels. */
+ if (observe
|| tp_channel_get_channel_type_id (channel) !=
EMP_IFACE_QUARK_CHANNEL_TYPE_SERVER_TLS_CONNECTION)
{
@@ -458,6 +461,7 @@ empathy_auth_factory_constructed (GObject *obj)
tp_base_client_set_handler_bypass_approval (client, FALSE);
+ /* Handle ServerTLSConnection and ServerAuthentication channels */
tp_base_client_take_handler_filter (client, tp_asv_new (
/* ChannelType */
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
@@ -481,6 +485,7 @@ empathy_auth_factory_constructed (GObject *obj)
* Claim() on the CDO so the approver won't get it, which makes
* sense. */
+ /* Observe ServerAuthentication channels */
tp_base_client_take_observer_filter (client, tp_asv_new (
/* ChannelType */
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,