Ignore:
Timestamp:
2010-03-17T13:56:52Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
b788246
Parents:
e5e795d (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 in 1.2.5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn.c

    re5e795d r75554d0  
    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 );
     
    139143       
    140144        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 );
     145                for( i = 0; *msn_away_state_list[i].code; i ++ )
     146                        if( *msn_away_state_list[i].name )
     147                                l = g_list_append( l, (void*) msn_away_state_list[i].name );
    143148       
    144149        return l;
     
    149154        char buf[1024];
    150155        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" );
     156       
     157        if( state )
     158                md->away_state = msn_away_state_by_name( state ) ? :
     159                                 msn_away_state_list + 1;
    155160        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 );
     161                md->away_state = msn_away_state_list;
     162       
     163        g_snprintf( buf, sizeof( buf ), "CHG %d %s\r\n", ++md->trId, md->away_state->code );
    162164        msn_write( ic, buf, strlen( buf ) );
    163165}
Note: See TracChangeset for help on using the changeset viewer.