Ignore:
Timestamp:
2006-12-05T20:40:17Z (17 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
7740c4c
Parents:
f4aa393 (diff), 55078f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

[merge] wilmer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/passport.c

    rf4aa393 rd8d63a2  
    5959        rep->data = data;
    6060        rep->func = func;
     61        rep->header = header;
    6162       
    6263        server = g_strdup( prd_cached );
     
    125126static char *passport_create_header( char *cookie, char *email, char *pwd )
    126127{
    127         char *buffer = g_new0( char, 2048 );
     128        char *buffer;
    128129        char *currenttoken;
    129130        char *email_enc, *pwd_enc;
     131       
     132        currenttoken = strstr( cookie, "lc=" );
     133        if( currenttoken == NULL )
     134                return NULL;
    130135       
    131136        email_enc = g_new0( char, strlen( email ) * 3 + 1 );
     
    137142        http_encode( pwd_enc );
    138143       
    139         currenttoken = strstr( cookie, "lc=" );
    140         if( currenttoken == NULL )
    141                 return( NULL );
    142        
    143         g_snprintf( buffer, 2048,
    144                     "Authorization: Passport1.4 OrgVerb=GET,"
    145                     "OrgURL=http%%3A%%2F%%2Fmessenger%%2Emsn%%2Ecom,"
    146                     "sign-in=%s,pwd=%s,%s", email_enc, pwd_enc,
    147                     currenttoken );
     144        buffer = g_strdup_printf( "Authorization: Passport1.4 OrgVerb=GET,"
     145                                  "OrgURL=http%%3A%%2F%%2Fmessenger%%2Emsn%%2Ecom,"
     146                                  "sign-in=%s,pwd=%s,%s", email_enc, pwd_enc,
     147                                  currenttoken );
    148148       
    149149        g_free( email_enc );
    150150        g_free( pwd_enc );
    151151       
    152         return( buffer );
     152        return buffer;
    153153}
    154154
     
    212212        if( passport_get_id_real( rep->func, rep->data, rep->header ) )
    213213        {
     214                rep->header = NULL;
    214215                destroy_reply( rep );
    215216                return;
Note: See TracChangeset for help on using the changeset viewer.