Changeset 93cc86f for lib


Ignore:
Timestamp:
2011-03-08T06:24:34Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
7add7ec
Parents:
9e9140b
Message:

Twitter: Warn the user if the OAuth username and the configured username
don't match. This is not a real problem but can be confusing if you don't
expect it.

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/oauth.c

    r9e9140b r93cc86f  
    229229                g_free( info->token );
    230230                g_free( info->token_secret );
     231                oauth_params_free( &info->params );
    231232                g_free( info );
    232233        }
     
    354355        if( req->status_code == 200 )
    355356        {
    356                 GSList *params = NULL;
    357                
    358                 oauth_params_parse( &params, req->reply_body );
    359                 st->token = g_strdup( oauth_params_get( &params, "oauth_token" ) );
    360                 st->token_secret = g_strdup( oauth_params_get( &params, "oauth_token_secret" ) );
    361                 oauth_params_free( &params );
     357                oauth_params_parse( &st->params, req->reply_body );
     358                st->token = g_strdup( oauth_params_get( &st->params, "oauth_token" ) );
     359                st->token_secret = g_strdup( oauth_params_get( &st->params, "oauth_token_secret" ) );
    362360        }
    363361       
     
    370368                g_free( st->request_token );
    371369                st->request_token = NULL;
     370                oauth_params_free( &st->params );
    372371        }
    373372}
  • lib/oauth.h

    r9e9140b r93cc86f  
    5252        char *token;
    5353        char *token_secret;
     54        GSList *params;
    5455};
    5556
     
    8990char *oauth_to_string( struct oauth_info *oi );
    9091struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp );
     92
     93/* For reading misc. data. */
     94const char *oauth_params_get( GSList **params, const char *key );
Note: See TracChangeset for help on using the changeset viewer.