Ignore:
Timestamp:
2010-03-12T19:10:16Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
dde9d571
Parents:
08e5bb2 (diff), 8b6b740 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    r08e5bb2 rbe609ff  
    139139       
    140140        if( l == NULL )
    141                 for( i = 0; msn_away_state_list[i].number > -1; i ++ )
    142                         l = g_list_append( l, (void*) msn_away_state_list[i].name );
     141                for( i = 0; *msn_away_state_list[i].code; i ++ )
     142                        if( *msn_away_state_list[i].name )
     143                                l = g_list_append( l, (void*) msn_away_state_list[i].name );
    143144       
    144145        return l;
     
    149150        char buf[1024];
    150151        struct msn_data *md = ic->proto_data;
    151         const struct msn_away_state *st;
    152        
    153         if( strcmp( state, GAIM_AWAY_CUSTOM ) == 0 )
    154                 st = msn_away_state_by_name( "Away" );
     152       
     153        if( state )
     154                md->away_state = msn_away_state_by_name( state ) ? :
     155                                 msn_away_state_list + 1;
    155156        else
    156                 st = msn_away_state_by_name( state );
    157        
    158         if( !st ) st = msn_away_state_list;
    159         md->away_state = st;
    160        
    161         g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, st->code );
     157                md->away_state = msn_away_state_list;
     158       
     159        g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code );
    162160        msn_write( ic, buf, strlen( buf ) );
    163161}
Note: See TracChangeset for help on using the changeset viewer.