From aef4828a1dc51de10a43bb7dd5d023de9971295b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 5 Apr 2007 22:20:31 -0700 Subject: More cleanups, mainly in the callbacks. Replaced things like do_error_dialog() and (set|hide)_login_progress(_error)?() with things that hopefully make more sense. Although it's still not really great... --- protocols/jabber/sasl.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'protocols/jabber/sasl.c') diff --git a/protocols/jabber/sasl.c b/protocols/jabber/sasl.c index 4943f59e..ab6f6c00 100644 --- a/protocols/jabber/sasl.c +++ b/protocols/jabber/sasl.c @@ -37,14 +37,14 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) /* Should abort this now, since we should already be doing IQ authentication. Strange things happen when you try to do both... */ - serv_got_crap( ic, "XMPP 1.0 non-compliant server seems to support SASL, please report this as a BitlBee bug!" ); + imc_log( ic, "XMPP 1.0 non-compliant server seems to support SASL, please report this as a BitlBee bug!" ); return XT_HANDLED; } s = xt_find_attr( node, "xmlns" ); if( !s || strcmp( s, XMLNS_SASL ) != 0 ) { - signoff( ic ); + imc_logout( ic ); return XT_ABORT; } @@ -61,8 +61,8 @@ xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) if( !sup_plain && !sup_digest ) { - hide_login_progress( ic, "No known SASL authentication schemes supported" ); - signoff( ic ); + imc_error( ic, "No known SASL authentication schemes supported" ); + imc_logout( ic ); return XT_ABORT; } @@ -278,8 +278,8 @@ xt_status sasl_pkt_challenge( struct xt_node *node, gpointer data ) goto silent_error; error: - hide_login_progress( ic, "Incorrect SASL challenge received" ); - signoff( ic ); + imc_error( ic, "Incorrect SASL challenge received" ); + imc_logout( ic ); silent_error: g_free( digest_uri ); @@ -302,19 +302,19 @@ xt_status sasl_pkt_result( struct xt_node *node, gpointer data ) s = xt_find_attr( node, "xmlns" ); if( !s || strcmp( s, XMLNS_SASL ) != 0 ) { - signoff( ic ); + imc_logout( ic ); return XT_ABORT; } if( strcmp( node->name, "success" ) == 0 ) { - set_login_progress( ic, 1, "Authentication finished" ); + imc_log( ic, "Authentication finished" ); jd->flags |= JFLAG_AUTHENTICATED | JFLAG_STREAM_RESTART; } else if( strcmp( node->name, "failure" ) == 0 ) { - hide_login_progress( ic, "Authentication failure" ); - signoff( ic ); + imc_error( ic, "Authentication failure" ); + imc_logout( ic ); return XT_ABORT; } -- cgit v1.2.3