changeset 30896:5750f2f2cc0d

merge of '837b54a614756c96003b17bffd4864c0e86d651f' and 'f01c542dc4811778ea9ae719b9b621eff9c6350b'
author Paul Aurich <paul@darkrain42.org>
date Tue, 02 Nov 2010 01:57:06 +0000
parents 9fc5ba01b321 (current diff) cea7e713ef07 (diff)
children 2d029c5cd305
files libpurple/protocols/msn/dialog.c libpurple/protocols/msn/dialog.h libpurple/protocols/msn/sync.c libpurple/protocols/msn/sync.h
diffstat 2 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Tue Nov 02 01:56:59 2010 +0000
+++ b/libpurple/protocols/jabber/auth.c	Tue Nov 02 01:57:06 2010 +0000
@@ -502,20 +502,30 @@
 	return 0;
 }
 
+void jabber_auth_add_mech(JabberSaslMech *mech)
+{
+	auth_mechs = g_slist_insert_sorted(auth_mechs, mech, compare_mech);
+}
+
+void jabber_auth_remove_mech(JabberSaslMech *mech)
+{
+	auth_mechs = g_slist_remove(auth_mechs, mech);
+}
+
 void jabber_auth_init(void)
 {
 	JabberSaslMech **tmp;
 	gint count, i;
 
-	auth_mechs = g_slist_insert_sorted(auth_mechs, jabber_auth_get_plain_mech(), compare_mech);
-	auth_mechs = g_slist_insert_sorted(auth_mechs, jabber_auth_get_digest_md5_mech(), compare_mech);
+	jabber_auth_add_mech(jabber_auth_get_plain_mech());
+	jabber_auth_add_mech(jabber_auth_get_digest_md5_mech());
 #ifdef HAVE_CYRUS_SASL
-	auth_mechs = g_slist_insert_sorted(auth_mechs, jabber_auth_get_cyrus_mech(), compare_mech);
+	jabber_auth_add_mech(jabber_auth_get_cyrus_mech());
 #endif
 
 	tmp = jabber_auth_get_scram_mechs(&count);
 	for (i = 0; i < count; ++i)
-		auth_mechs = g_slist_insert_sorted(auth_mechs, tmp[i], compare_mech);
+		jabber_auth_add_mech(tmp[i]);
 }
 
 void jabber_auth_uninit(void)
--- a/libpurple/protocols/jabber/auth.h	Tue Nov 02 01:56:59 2010 +0000
+++ b/libpurple/protocols/jabber/auth.h	Tue Nov 02 01:57:06 2010 +0000
@@ -58,6 +58,9 @@
 JabberSaslMech *jabber_auth_get_cyrus_mech(void);
 #endif
 
+void jabber_auth_add_mech(JabberSaslMech *);
+void jabber_auth_remove_mech(JabberSaslMech *);
+
 void jabber_auth_init(void);
 void jabber_auth_uninit(void);