diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-14 00:09:40 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-14 00:09:40 +0200 | 
| commit | 37aa3172c7e9ec6ba7b5985ed60c41c621e8e7b9 (patch) | |
| tree | 9ff394ae50d2bd0e01d15b5cf85bbcd40e0b955d /protocols/twitter/twitter_lib.c | |
| parent | 3254c12328517b8b4bc12d8ef412c6b878f7b28d (diff) | |
Small Valgrind noise fix. (Check if the conn is still alive before getting
its private data.)
Diffstat (limited to 'protocols/twitter/twitter_lib.c')
| -rw-r--r-- | protocols/twitter/twitter_lib.c | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 36871e93..081612ac 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -182,11 +182,12 @@ static void twitter_http_get_friends_ids(struct http_request *req)  	struct twitter_data *td;  	ic = req->data; -	td = ic->proto_data;  	// Check if the connection is still active.  	if( !g_slist_find( twitter_connections, ic ) )  		return; +	 +	td = ic->proto_data;  	// Check if the HTTP request went well.  	if (req->status_code != 200) { @@ -467,13 +468,15 @@ static void twitter_private_message_chat(struct im_connection *ic, GSList *list)  static void twitter_http_get_home_timeline(struct http_request *req)  {  	struct im_connection *ic = req->data; -	struct twitter_data *td = ic->proto_data; +	struct twitter_data *td;  	struct xt_parser *parser;  	struct twitter_xml_list *txl;  	// Check if the connection is still active.  	if( !g_slist_find( twitter_connections, ic ) )  		return; +	 +	td = ic->proto_data;  	// Check if the HTTP request went well.  	if (req->status_code == 200) @@ -528,7 +531,7 @@ static void twitter_http_get_home_timeline(struct http_request *req)  static void twitter_http_get_statuses_friends(struct http_request *req)  {  	struct im_connection *ic = req->data; -	struct twitter_data *td = ic->proto_data; +	struct twitter_data *td;  	struct xt_parser *parser;  	struct twitter_xml_list *txl;  	GSList *l = NULL; @@ -537,7 +540,9 @@ static void twitter_http_get_statuses_friends(struct http_request *req)  	// Check if the connection is still active.  	if( !g_slist_find( twitter_connections, ic ) )  		return; - +	 +	td = ic->proto_data; +	  	// Check if the HTTP request went well.  	if (req->status_code != 200) {  		// It didn't go well, output the error and return. | 
