# HG changeset patch # User Paul Aurich # Date 1288663026 0 # Node ID 5750f2f2cc0dc143645d223c8106cf0919cc38de # Parent 9fc5ba01b321d477f61544f9945cee3be53fabd3# Parent cea7e713ef0709d1c4ef62fbc53bc79954457081 merge of '837b54a614756c96003b17bffd4864c0e86d651f' and 'f01c542dc4811778ea9ae719b9b621eff9c6350b' diff -r 9fc5ba01b321 -r 5750f2f2cc0d libpurple/protocols/jabber/auth.c --- 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) diff -r 9fc5ba01b321 -r 5750f2f2cc0d libpurple/protocols/jabber/auth.h --- 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);