diff options
| -rw-r--r-- | protocols/yahoo/libyahoo2.c | 8 | ||||
| -rw-r--r-- | protocols/yahoo/yahoo.c | 31 | 
2 files changed, 22 insertions, 17 deletions
| diff --git a/protocols/yahoo/libyahoo2.c b/protocols/yahoo/libyahoo2.c index 1d943df7..a1755cc9 100644 --- a/protocols/yahoo/libyahoo2.c +++ b/protocols/yahoo/libyahoo2.c @@ -2485,9 +2485,8 @@ static void yahoo_https_auth_finish(struct http_request *req)  	yahoo_packet_free(pack); -	return; -	  fail: +	g_free(crumb);  	g_free(had->token);  	g_free(had->chal);  	g_free(had); @@ -4134,7 +4133,10 @@ void yahoo_logoff(int id)  	LOG(("yahoo_logoff: current status: %d", yd->current_status)); -	if(yd->current_status != -1) { +	if(yd->current_status != -1 && 0) { +		/* Meh. Don't send this. The event handlers are not going to +		   get to do this so it'll just leak memory. And the TCP +		   connection reset will hopefully be clear enough. */  		pkt = yahoo_packet_new(YAHOO_SERVICE_LOGOFF, YAHOO_STATUS_AVAILABLE, yd->session_id);  		yd->current_status = -1; diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index 96f619ed..ac57d4b6 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -253,20 +253,23 @@ static void byahoo_set_away( struct im_connection *ic, char *state, char *msg )  static GList *byahoo_away_states( struct im_connection *ic )  { -	GList *m = NULL; - -	m = g_list_append( m, "Available" ); -	m = g_list_append( m, "Be Right Back" ); -	m = g_list_append( m, "Busy" ); -	m = g_list_append( m, "Not At Home" ); -	m = g_list_append( m, "Not At Desk" ); -	m = g_list_append( m, "Not In Office" ); -	m = g_list_append( m, "On Phone" ); -	m = g_list_append( m, "On Vacation" ); -	m = g_list_append( m, "Out To Lunch" ); -	m = g_list_append( m, "Stepped Out" ); -	m = g_list_append( m, "Invisible" ); -	m = g_list_append( m, GAIM_AWAY_CUSTOM ); +	static GList *m = NULL; + +	if( m == NULL ) +	{ +		m = g_list_append( m, "Available" ); +		m = g_list_append( m, "Be Right Back" ); +		m = g_list_append( m, "Busy" ); +		m = g_list_append( m, "Not At Home" ); +		m = g_list_append( m, "Not At Desk" ); +		m = g_list_append( m, "Not In Office" ); +		m = g_list_append( m, "On Phone" ); +		m = g_list_append( m, "On Vacation" ); +		m = g_list_append( m, "Out To Lunch" ); +		m = g_list_append( m, "Stepped Out" ); +		m = g_list_append( m, "Invisible" ); +		m = g_list_append( m, GAIM_AWAY_CUSTOM ); +	}  	return m;  } | 
