aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-sasl-mechanisms.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 20:10:22 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-11 21:10:43 +0800
commit8fe7c7a2348dcfc1f7833eb84264e9437d5795e8 (patch)
treec9a3c1f8b710f760e70595e64a01a32792e5861a /libempathy/empathy-sasl-mechanisms.c
parent9a0c691c865b369438ef789638f33fd21aab0551 (diff)
downloadgsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.tar
gsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.tar.gz
gsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.tar.bz2
gsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.tar.lz
gsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.tar.xz
gsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.tar.zst
gsoc2013-empathy-8fe7c7a2348dcfc1f7833eb84264e9437d5795e8.zip
use tp_channel_dup_immutable_properties()
tp_channel_borrow_immutable_properties() has been deprecated.
Diffstat (limited to 'libempathy/empathy-sasl-mechanisms.c')
-rw-r--r--libempathy/empathy-sasl-mechanisms.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/libempathy/empathy-sasl-mechanisms.c b/libempathy/empathy-sasl-mechanisms.c
index b900fa5da..3eaa0108d 100644
--- a/libempathy/empathy-sasl-mechanisms.c
+++ b/libempathy/empathy-sasl-mechanisms.c
@@ -344,15 +344,22 @@ gboolean
empathy_sasl_channel_supports_mechanism (TpChannel *channel,
const gchar *mechanism)
{
- GHashTable *props;
- const gchar * const *available_mechanisms;
+ GVariant *props;
+ GStrv available_mechanisms;
+ gboolean result;
- props = tp_channel_borrow_immutable_properties (channel);
- available_mechanisms = tp_asv_get_boxed (props,
+ props = tp_channel_dup_immutable_properties (channel);
+
+ g_variant_lookup (props,
TP_PROP_CHANNEL_INTERFACE_SASL_AUTHENTICATION_AVAILABLE_MECHANISMS,
- G_TYPE_STRV);
+ "^as", &available_mechanisms);
+
+ result = tp_strv_contains ((const gchar * const *) available_mechanisms,
+ mechanism);
- return tp_strv_contains (available_mechanisms, mechanism);
+ g_variant_unref (props);
+ g_strfreev (available_mechanisms);
+ return result;
}
EmpathySaslMechanism