From 73720bb84423e70ad21599b4713d1137f8a85e73 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 18 Mar 2011 10:23:58 +0100 Subject: common_checks: rename must_be_sasl arg to observe It was things clearer and easier to understand. --- libempathy/empathy-auth-factory.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libempathy/empathy-auth-factory.c') diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c index 02a86861f..96b6bf58a 100644 --- a/libempathy/empathy-auth-factory.c +++ b/libempathy/empathy-auth-factory.c @@ -168,7 +168,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); @@ -195,7 +195,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) { @@ -456,6 +459,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, @@ -479,6 +483,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, -- cgit v1.2.3