diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-07 17:33:02 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-07 17:33:02 +0100 | 
| commit | daae10fbfe16bac26f74af91faf253d377f1b166 (patch) | |
| tree | e7870e81be568ab10abcc1bf8639a9191dbbb9c1 /protocols/jabber/jabber.c | |
| parent | 289bd2d47ff58f42879ad50ebbc1b193831e4a78 (diff) | |
OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@opencsw.org>
with some changes.
Diffstat (limited to 'protocols/jabber/jabber.c')
| -rw-r--r-- | protocols/jabber/jabber.c | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 01353f8e..229e35bf 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -380,7 +380,7 @@ static void jabber_get_info( struct im_connection *ic, char *who )  		imcb_log( ic, "Buddy %s (%d) information:", bud->full_jid, bud->priority );  		if( bud->away_state )  			imcb_log( ic, "Away state: %s", bud->away_state->full_name ); -		imcb_log( ic, "Status message: %s", bud->away_message ? : "(none)" ); +		imcb_log( ic, "Status message: %s", bud->away_message ? bud->away_message : "(none)" );  		bud = bud->next;  	} @@ -394,8 +394,10 @@ static void jabber_set_away( struct im_connection *ic, char *state_txt, char *me  	/* state_txt == NULL -> Not away.  	   Unknown state -> fall back to the first defined away state. */ -	jd->away_state = state_txt ? jabber_away_state_by_name( state_txt ) -	                 ? : jabber_away_state_list : NULL; +	if( state_txt == NULL ) +		jd->away_state = NULL; +	else if( ( jd->away_state = jabber_away_state_by_name( state_txt ) ) == NULL ) +		jd->away_state = jabber_away_state_list;  	g_free( jd->away_message );  	jd->away_message = ( message && *message ) ? g_strdup( message ) : NULL;  | 
