diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-12-14 10:31:49 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-12-14 10:31:49 +0000 | 
| commit | c0c43fba49da3d14097f2c7cf3569a829b84125a (patch) | |
| tree | 06414233d0b5fdd20482a77ca89952b846b37a32 /protocols/yahoo | |
| parent | 939370c674071a198e3115f9fa511fa51e8bea9e (diff) | |
Fixed ic->away leaking memory. This var is only used by OSCAR and should
maybe be killed. Also fixed some completely broken indentation in those
functions.
Diffstat (limited to 'protocols/yahoo')
| -rw-r--r-- | protocols/yahoo/yahoo.c | 13 | 
1 files changed, 7 insertions, 6 deletions
| diff --git a/protocols/yahoo/yahoo.c b/protocols/yahoo/yahoo.c index fa36de39..3e844c55 100644 --- a/protocols/yahoo/yahoo.c +++ b/protocols/yahoo/yahoo.c @@ -196,13 +196,14 @@ static int byahoo_send_typing( struct im_connection *ic, char *who, int typing )  static void byahoo_set_away( struct im_connection *ic, char *state, char *msg )  {  	struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data; +	char *away; -	ic->away = NULL; +	away = NULL;  	if( state && msg && g_strcasecmp( state, msg ) != 0 )  	{  		yd->current_status = YAHOO_STATUS_CUSTOM; -		ic->away = ""; +		away = "";  	}  	else if( state )  	{ @@ -211,11 +212,11 @@ static void byahoo_set_away( struct im_connection *ic, char *state, char *msg )  		   away state. */  		msg = NULL; -		ic->away = ""; +		away = "";  		if( g_strcasecmp( state, "Available" ) == 0 )  		{  			yd->current_status = YAHOO_STATUS_AVAILABLE; -			ic->away = NULL; +			away = NULL;  		}  		else if( g_strcasecmp( state, "Be Right Back" ) == 0 )  			yd->current_status = YAHOO_STATUS_BRB; @@ -241,13 +242,13 @@ static void byahoo_set_away( struct im_connection *ic, char *state, char *msg )  		{  			yd->current_status = YAHOO_STATUS_AVAILABLE; -			ic->away = NULL; +			away = NULL;  		}  	}  	else  		yd->current_status = YAHOO_STATUS_AVAILABLE; -	yahoo_set_away( yd->y2_id, yd->current_status, msg, ic->away != NULL ? 2 : 0 ); +	yahoo_set_away( yd->y2_id, yd->current_status, msg, away != NULL ? 2 : 0 );  }  static GList *byahoo_away_states( struct im_connection *ic ) | 
