Changeset e8c8d00 for protocols/msn/msn.c
- Timestamp:
- 2010-03-17T15:15:19Z (14 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
r1c3008a re8c8d00 26 26 #include "nogaim.h" 27 27 #include "msn.h" 28 29 int msn_chat_id; 30 GSList *msn_connections; 31 GSList *msn_switchboards; 28 32 29 33 static char *msn_set_display_name( set_t *set, char *value ); … … 143 147 144 148 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 ); 147 152 148 153 return l; … … 153 158 char buf[1024]; 154 159 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; 159 164 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 ); 166 168 msn_write( ic, buf, strlen( buf ) ); 167 169 }
Note: See TracChangeset
for help on using the changeset viewer.