aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2012-03-10 00:00:25 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2012-03-10 00:00:25 +0000
commit0872bb2af342aa078fe5ae1dd3ea116eab6ddb1e (patch)
tree8b5b0f5176ead8385eeb5765536da0a52e964f63 /protocols
parente3710118a633654916e28f0ae68064050d565b61 (diff)
Fix bug that broke MSN-XMPP with confusing error messages.
Diffstat (limited to 'protocols')
-rw-r--r--protocols/jabber/sasl.c5
1 files changed, 3 insertions, 2 deletions
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 )
{