Changeset 6eca2eb for protocols/twitter
- Timestamp:
- 2011-04-18T14:14:08Z (14 years ago)
- Branches:
- master
- Children:
- 2423c93
- Parents:
- 6cc36ef
- Location:
- protocols/twitter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.c
r6cc36ef r6eca2eb 151 151 if( info->request_token == NULL ) 152 152 { 153 imcb_error( ic, "OAuth error: %s", info->http->status_string);153 imcb_error( ic, "OAuth error: %s", twitter_parse_error( info->http ) ); 154 154 imc_logout( ic, TRUE ); 155 155 return FALSE; … … 167 167 if( info->token == NULL || info->token_secret == NULL ) 168 168 { 169 imcb_error( ic, "OAuth error: %s", info->http->status_string);169 imcb_error( ic, "OAuth error: %s", twitter_parse_error( info->http ) ); 170 170 imc_logout( ic, TRUE ); 171 171 return FALSE; -
protocols/twitter/twitter.h
r6cc36ef r6eca2eb 85 85 void twitter_login_finish( struct im_connection *ic ); 86 86 87 struct http_request; 88 char *twitter_parse_error( struct http_request *req ); 89 87 90 #endif //_TWITTER_H -
protocols/twitter/twitter_lib.c
r6cc36ef r6eca2eb 142 142 /* Warning: May return a malloc()ed value, which will be free()d on the next 143 143 call. Only for short-term use. */ 144 staticchar *twitter_parse_error(struct http_request *req)144 char *twitter_parse_error(struct http_request *req) 145 145 { 146 146 static char *ret = NULL; … … 161 161 { 162 162 ret = g_strdup_printf("%s (%s)", req->status_string, node->text); 163 xt_free(xp);164 return ret;165 163 } 166 164 … … 168 166 } 169 167 170 return re q->status_string;168 return ret ? ret : req->status_string; 171 169 } 172 170
Note: See TracChangeset
for help on using the changeset viewer.