aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/sasl.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-04-05 22:20:31 -0700
committerWilmer van der Gaast <wilmer@gaast.net>2007-04-05 22:20:31 -0700
commitaef4828a1dc51de10a43bb7dd5d023de9971295b (patch)
treecbb675b41369f1ada1579fba4060726573cf9cb5 /protocols/jabber/sasl.c
parent0da65d5fb37691ed4d31f7ab4058732f1440db6b (diff)
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...
Diffstat (limited to 'protocols/jabber/sasl.c')
-rw-r--r--protocols/jabber/sasl.c20
1 files changed, 10 insertions, 10 deletions
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;
}