diff options
Diffstat (limited to 'protocols/jabber/jabber_util.c')
| -rw-r--r-- | protocols/jabber/jabber_util.c | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index c7f88032..7a802ba1 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -231,10 +231,9 @@ xt_status jabber_cache_handle_packet( struct im_connection *ic, struct xt_node *  const struct jabber_away_state jabber_away_state_list[] =  {  	{ "away",  "Away" }, -	{ "chat",  "Free for Chat" }, +	{ "chat",  "Free for Chat" },   /* WTF actually uses this? */  	{ "dnd",   "Do not Disturb" },  	{ "xa",    "Extended Away" }, -	{ "",      "Online" },  	{ "",      NULL }  }; @@ -242,6 +241,9 @@ const struct jabber_away_state *jabber_away_state_by_code( char *code )  {  	int i; +	if( code == NULL ) +		return NULL; +	  	for( i = 0; jabber_away_state_list[i].full_name; i ++ )  		if( g_strcasecmp( jabber_away_state_list[i].code, code ) == 0 )  			return jabber_away_state_list + i; @@ -253,6 +255,9 @@ const struct jabber_away_state *jabber_away_state_by_name( char *name )  {  	int i; +	if( name == NULL ) +		return NULL; +	  	for( i = 0; jabber_away_state_list[i].full_name; i ++ )  		if( g_strcasecmp( jabber_away_state_list[i].full_name, name ) == 0 )  			return jabber_away_state_list + i; | 
