diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-01 14:53:59 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-05-01 14:53:59 +0100 | 
| commit | c2ecadc08daa5163f4c90aef36de0e33d0d44f16 (patch) | |
| tree | a88c01b58c6ec593f47b6efffec5be6d80555737 /protocols/twitter/twitter_http.c | |
| parent | 85ef57f94436f23447c0d8603b52977824381854 (diff) | |
Cleaned up OAuth stuff: consumer key/secret should *not* be in lib/oauth.c.
Keep it in the Twitter module, and use the oauth_info struct through the
whole session to keep all this together.
Diffstat (limited to 'protocols/twitter/twitter_http.c')
| -rw-r--r-- | protocols/twitter/twitter_http.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/protocols/twitter/twitter_http.c b/protocols/twitter/twitter_http.c index 93e315fa..51f437df 100644 --- a/protocols/twitter/twitter_http.c +++ b/protocols/twitter/twitter_http.c @@ -28,7 +28,6 @@  *                                                                           *  ****************************************************************************/  -#include "twitter_http.h"  #include "twitter.h"  #include "bitlbee.h"  #include "url.h" @@ -38,6 +37,8 @@  #include <ctype.h>  #include <errno.h> +#include "twitter_http.h" +  char *twitter_url_append(char *url, char *key, char* value); @@ -45,7 +46,7 @@ char *twitter_url_append(char *url, char *key, char* value);   * Do a request.   * This is actually pretty generic function... Perhaps it should move to the lib/http_client.c   */ -void *twitter_http(char *url_string, http_input_function func, gpointer data, int is_post, char* user, char* pass, char* oauth_token, char** arguments, int arguments_len) +void *twitter_http(char *url_string, http_input_function func, gpointer data, int is_post, char* user, char* pass, struct oauth_info* oi, char** arguments, int arguments_len)  {  	url_t *url = g_new0( url_t, 1 );  	char *tmp; @@ -110,12 +111,11 @@ void *twitter_http(char *url_string, http_input_function func, gpointer data, in  	                            is_post ? "POST" : "GET", url->file, url->host );  	// If a pass and user are given we append them to the request. -	if (oauth_token) +	if (oi)  	{  		char *full_header; -		full_header = oauth_http_header(oauth_token, -		                                is_post ? "POST" : "GET", +		full_header = oauth_http_header(oi, is_post ? "POST" : "GET",  		                                url_string, url_arguments);  		tmp = g_strdup_printf("%sAuthorization: %s\r\n", request, full_header); | 
