aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 20:03:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 21:10:43 +0800
commit8be106a4c0b7ae2ddfe91b796669488db8e38c1f (patch)
tree35aae48970d06ac9d8067eeaa4c08bc9d0f3483b
parent6b5d8ab2badd9aee642a45b1c49e9aad265d201f (diff)
downloadgsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.tar
gsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.tar.gz
gsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.tar.bz2
gsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.tar.lz
gsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.tar.xz
gsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.tar.zst
gsoc2013-empathy-8be106a4c0b7ae2ddfe91b796669488db8e38c1f.zip
event-manager: use empathy_sasl_channel_supports_mechanism()
There is no point re-implementing it.
-rw-r--r--src/empathy-event-manager.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index c4d2e09a9..7e34f4ce6 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -34,6 +34,7 @@
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-gsettings.h>
+#include <libempathy/empathy-sasl-mechanisms.h>
#include <extensions/extensions.h>
@@ -966,15 +967,7 @@ approve_sasl_channel (EmpathyEventManager *self,
TpAddDispatchOperationContext *context,
TpChannel *channel)
{
- GHashTable *props;
- const gchar * const *available_mechanisms;
-
- props = tp_channel_borrow_immutable_properties (channel);
- available_mechanisms = tp_asv_get_boxed (props,
- TP_PROP_CHANNEL_INTERFACE_SASL_AUTHENTICATION_AVAILABLE_MECHANISMS,
- G_TYPE_STRV);
-
- if (tp_strv_contains (available_mechanisms, "X-TELEPATHY-PASSWORD"))
+ if (empathy_sasl_channel_supports_mechanism (channel, "X-TELEPATHY-PASSWORD"))
{
event_manager_add (approval->manager, account, NULL,
EMPATHY_EVENT_TYPE_AUTH,