Changeset 4be0e34


Ignore:
Timestamp:
2011-12-19T00:41:40Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
36533bf
Parents:
bf57cd1
Message:

Give a list of SASL mechanisms supported by a server when reporting we don't
support any of them.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/oauth.c

    rbf57cd1 r4be0e34  
    135135       
    136136        if( params == NULL )
    137                 return NULL;
     137                return;
    138138       
    139139        for( l = *params; l; l = n )
  • protocols/jabber/sasl.c

    rbf57cd1 r4be0e34  
    6565        int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0, sup_ms = 0;
    6666        int want_oauth = FALSE;
     67        GString *mechs;
    6768       
    6869        if( !sasl_supported( ic ) )
     
    8384        }
    8485       
     86        mechs = g_string_new( "" );
    8587        c = node->children;
    8688        while( ( c = xt_find_node( c, "mechanism" ) ) )
     
    9799                        sup_ms = 1;
    98100               
     101                if( c->text )
     102                        g_string_append_printf( mechs, " %s", c->text );
     103               
    99104                c = c->next;
    100105        }
     
    102107        if( !sup_plain && !sup_digest && !sup_gtalk && !sup_fb && !sup_ms )
    103108        {
    104                 imcb_error( ic, "No known SASL authentication schemes supported" );
     109                imcb_error( ic, "BitlBee does not support any of the offered SASL "
     110                                "authentication schemes:%s", mechs->str );
    105111                imc_logout( ic, FALSE );
     112                g_string_free( mechs, TRUE );
    106113                return XT_ABORT;
    107114        }
     115        g_string_free( mechs, TRUE );
    108116       
    109117        reply = xt_new_node( "auth", NULL, NULL );
     
    537545                ic->acc->pass = g_strdup_printf( "refresh_token=%s", refresh_token );
    538546        }
     547        /* Should do this, but only in the Facebook case where we get an access
     548           token that never expires. Shouldn't overwrite a refresh token with
     549           an access token.
     550        else
     551        {
     552                g_free( ic->acc->pass );
     553                ic->acc->pass = g_strdup_printf( "access_token=%s", access_token );
     554        } */
    539555       
    540556        g_free( jd->oauth2_access_token );
Note: See TracChangeset for help on using the changeset viewer.