Changes in protocols/yahoo/yahoo.c [5a348c3:a36b030]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo.c
r5a348c3 ra36b030 192 192 gc->away = NULL; 193 193 194 if( msg)194 if( state && msg && g_strcasecmp( state, msg ) != 0 ) 195 195 { 196 196 yd->current_status = YAHOO_STATUS_CUSTOM; 197 197 gc->away = ""; 198 198 } 199 if( state ) 200 { 199 else if( state ) 200 { 201 /* Set msg to NULL since (if it isn't NULL already) it's equal 202 to state. msg must be empty if we want to use an existing 203 away state. */ 204 msg = NULL; 205 201 206 gc->away = ""; 202 207 if( g_strcasecmp( state, "Available" ) == 0 ) … … 235 240 yd->current_status = YAHOO_STATUS_AVAILABLE; 236 241 237 if( yd->current_status == YAHOO_STATUS_INVISIBLE ) 238 yahoo_set_away( yd->y2_id, yd->current_status, NULL, gc->away != NULL ); 239 else 240 yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL ); 242 yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL ); 241 243 } 242 244 … … 443 445 }; 444 446 445 void byahoo_connect_callback( gpointer data, gint source, GaimInputCondition cond )447 void byahoo_connect_callback( gpointer data, gint source, b_input_condition cond ) 446 448 { 447 449 struct byahoo_connect_callback_data *d = data; … … 465 467 }; 466 468 467 void byahoo_read_ready_callback( gpointer data, gint source, GaimInputCondition cond )469 gboolean byahoo_read_ready_callback( gpointer data, gint source, b_input_condition cond ) 468 470 { 469 471 struct byahoo_read_ready_data *d = data; 470 472 471 473 if( !byahoo_get_gc_by_id( d->id ) ) 472 {473 474 /* WTF doesn't libyahoo clean this up? */ 474 ext_yahoo_remove_handler( d->id, d->tag ); 475 return; 476 } 475 return FALSE; 477 476 478 477 yahoo_read_ready( d->id, d->fd, d->data ); 478 479 return TRUE; 479 480 } 480 481 … … 487 488 }; 488 489 489 void byahoo_write_ready_callback( gpointer data, gint source, GaimInputCondition cond )490 gboolean byahoo_write_ready_callback( gpointer data, gint source, b_input_condition cond ) 490 491 { 491 492 struct byahoo_write_ready_data *d = data; 492 493 493 494 if( !byahoo_get_gc_by_id( d->id ) ) 494 {495 495 /* WTF doesn't libyahoo clean this up? */ 496 ext_yahoo_remove_handler( d->id, d->tag ); 497 return; 498 } 496 return FALSE; 499 497 500 498 yahoo_write_ready( d->id, d->fd, d->data ); 499 500 return FALSE; 501 501 } 502 502 … … 687 687 688 688 inp->d = d; 689 d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_READ, (GaimInputFunction) byahoo_read_ready_callback, (gpointer) d );689 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d ); 690 690 } 691 691 else if( cond == YAHOO_INPUT_WRITE ) … … 698 698 699 699 inp->d = d; 700 d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_WRITE, (GaimInputFunction) byahoo_write_ready_callback, (gpointer) d );700 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d ); 701 701 } 702 702 else … … 729 729 } 730 730 731 gaim_input_remove( tag );731 b_event_remove( tag ); 732 732 } 733 733 … … 738 738 739 739 d = g_new0( struct byahoo_connect_callback_data, 1 ); 740 if( ( fd = proxy_connect( host, port, ( GaimInputFunction) byahoo_connect_callback, (gpointer) d ) ) < 0 )740 if( ( fd = proxy_connect( host, port, (b_event_handler) byahoo_connect_callback, (gpointer) d ) ) < 0 ) 741 741 { 742 742 g_free( d );
Note: See TracChangeset
for help on using the changeset viewer.