diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-07 22:24:34 -0800 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-03-07 22:24:34 -0800 |
commit | 93cc86fe9e3be0ce83d20790327f41df3b0f6949 (patch) | |
tree | 3d44c9f1226b8b9302df5d368b412360cfb91cca /lib/oauth.c | |
parent | 9e9140b16ab7551c0588a58f065d7c9fbc8475fe (diff) |
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.
Diffstat (limited to 'lib/oauth.c')
-rw-r--r-- | lib/oauth.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/oauth.c b/lib/oauth.c index 57dd10f8..14e7797c 100644 --- a/lib/oauth.c +++ b/lib/oauth.c @@ -228,6 +228,7 @@ void oauth_info_free( struct oauth_info *info ) g_free( info->request_token ); g_free( info->token ); g_free( info->token_secret ); + oauth_params_free( &info->params ); g_free( info ); } } @@ -353,12 +354,9 @@ static void oauth_access_token_done( struct http_request *req ) if( req->status_code == 200 ) { - GSList *params = NULL; - - oauth_params_parse( ¶ms, req->reply_body ); - st->token = g_strdup( oauth_params_get( ¶ms, "oauth_token" ) ); - st->token_secret = g_strdup( oauth_params_get( ¶ms, "oauth_token_secret" ) ); - oauth_params_free( ¶ms ); + oauth_params_parse( &st->params, req->reply_body ); + st->token = g_strdup( oauth_params_get( &st->params, "oauth_token" ) ); + st->token_secret = g_strdup( oauth_params_get( &st->params, "oauth_token_secret" ) ); } st->stage = OAUTH_ACCESS_TOKEN; @@ -369,6 +367,7 @@ static void oauth_access_token_done( struct http_request *req ) st->auth_url = NULL; g_free( st->request_token ); st->request_token = NULL; + oauth_params_free( &st->params ); } } |