From 0872bb2af342aa078fe5ae1dd3ea116eab6ddb1e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 10 Mar 2012 00:00:25 +0000 Subject: Fix bug that broke MSN-XMPP with confusing error messages. --- protocols/jabber/sasl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/jabber/sasl.c') diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c index d08890a6..f25d44c4 100644 --- a/protocols/jabber/sasl.c +++ b/protocols/jabber/sasl.c @@ -83,6 +83,8 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) return XT_ABORT; } + want_oauth = set_getbool( &ic->acc->set, "oauth" ); + mechs = g_string_new( "" ); c = node->children; while( ( c = xt_find_node( c, "mechanism" ) ) ) @@ -104,7 +106,7 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) c = c->next; } - if( !sup_plain && !sup_digest ) + if( !want_oauth && !sup_plain && !sup_digest ) { if( !sup_gtalk && !sup_fb && !sup_ms ) imcb_error( ic, "This server requires OAuth " @@ -120,7 +122,6 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) reply = xt_new_node( "auth", NULL, NULL ); xt_add_attr( reply, "xmlns", XMLNS_SASL ); - want_oauth = set_getbool( &ic->acc->set, "oauth" ); if( sup_gtalk && want_oauth ) { -- cgit v1.2.3