Ignore:
Timestamp:
2010-03-17T15:15:19Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
60e4df3
Parents:
1c3008a (diff), f9928cb (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

    r1c3008a re8c8d00  
    2626#include "nogaim.h"
    2727#include "msn.h"
     28
     29int msn_chat_id;
     30GSList *msn_connections;
     31GSList *msn_switchboards;
    2832
    2933static char *msn_set_display_name( set_t *set, char *value );
     
    143147       
    144148        if( l == NULL )
    145                 for( i = 0; msn_away_state_list[i].number > -1; i ++ )
    146                         l = g_list_append( l, (void*) msn_away_state_list[i].name );
     149                for( i = 0; *msn_away_state_list[i].code; i ++ )
     150                        if( *msn_away_state_list[i].name )
     151                                l = g_list_append( l, (void*) msn_away_state_list[i].name );
    147152       
    148153        return l;
     
    153158        char buf[1024];
    154159        struct msn_data *md = ic->proto_data;
    155         const struct msn_away_state *st;
    156        
    157         if( strcmp( state, GAIM_AWAY_CUSTOM ) == 0 )
    158                 st = msn_away_state_by_name( "Away" );
     160       
     161        if( state )
     162                md->away_state = msn_away_state_by_name( state ) ? :
     163                                 msn_away_state_list + 1;
    159164        else
    160                 st = msn_away_state_by_name( state );
    161        
    162         if( !st ) st = msn_away_state_list;
    163         md->away_state = st;
    164        
    165         g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, st->code );
     165                md->away_state = msn_away_state_list;
     166       
     167        g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code );
    166168        msn_write( ic, buf, strlen( buf ) );
    167169}
Note: See TracChangeset for help on using the changeset viewer.