Changes in protocols/yahoo/yahoo.c [5a348c3:0a3c243]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo.c
r5a348c3 r0a3c243 121 121 } 122 122 123 static void byahoo_login( struct aim_user *user)124 { 125 struct gaim_connection *gc = new_gaim_conn( user);123 static void byahoo_login( account_t *acc ) 124 { 125 struct gaim_connection *gc = new_gaim_conn( acc ); 126 126 struct byahoo_data *yd = gc->proto_data = g_new0( struct byahoo_data, 1 ); 127 127 … … 130 130 131 131 set_login_progress( gc, 1, "Connecting" ); 132 yd->y2_id = yahoo_init( user->username, user->password);132 yd->y2_id = yahoo_init( acc->user, acc->pass ); 133 133 yahoo_login( yd->y2_id, yd->current_status ); 134 134 } … … 425 425 yd = gc->proto_data; 426 426 427 if( !strcmp(gc->prpl->name, "yahoo")&& yd->y2_id == id )427 if( strcmp( gc->acc->prpl->name, "yahoo" ) == 0 && yd->y2_id == id ) 428 428 return( gc ); 429 429 } … … 443 443 }; 444 444 445 void byahoo_connect_callback( gpointer data, gint source, GaimInputCondition cond )445 void byahoo_connect_callback( gpointer data, gint source, b_input_condition cond ) 446 446 { 447 447 struct byahoo_connect_callback_data *d = data; … … 465 465 }; 466 466 467 void byahoo_read_ready_callback( gpointer data, gint source, GaimInputCondition cond )467 gboolean byahoo_read_ready_callback( gpointer data, gint source, b_input_condition cond ) 468 468 { 469 469 struct byahoo_read_ready_data *d = data; 470 470 471 471 if( !byahoo_get_gc_by_id( d->id ) ) 472 {473 472 /* WTF doesn't libyahoo clean this up? */ 474 ext_yahoo_remove_handler( d->id, d->tag ); 475 return; 476 } 473 return FALSE; 477 474 478 475 yahoo_read_ready( d->id, d->fd, d->data ); 476 477 return TRUE; 479 478 } 480 479 … … 487 486 }; 488 487 489 void byahoo_write_ready_callback( gpointer data, gint source, GaimInputCondition cond )488 gboolean byahoo_write_ready_callback( gpointer data, gint source, b_input_condition cond ) 490 489 { 491 490 struct byahoo_write_ready_data *d = data; 492 491 493 492 if( !byahoo_get_gc_by_id( d->id ) ) 494 {495 493 /* WTF doesn't libyahoo clean this up? */ 496 ext_yahoo_remove_handler( d->id, d->tag ); 497 return; 498 } 494 return FALSE; 499 495 500 496 yahoo_write_ready( d->id, d->fd, d->data ); 497 498 return FALSE; 501 499 } 502 500 … … 687 685 688 686 inp->d = d; 689 d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_READ, (GaimInputFunction) byahoo_read_ready_callback, (gpointer) d );687 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d ); 690 688 } 691 689 else if( cond == YAHOO_INPUT_WRITE ) … … 698 696 699 697 inp->d = d; 700 d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_WRITE, (GaimInputFunction) byahoo_write_ready_callback, (gpointer) d );698 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d ); 701 699 } 702 700 else … … 729 727 } 730 728 731 gaim_input_remove( tag );729 b_event_remove( tag ); 732 730 } 733 731 … … 738 736 739 737 d = g_new0( struct byahoo_connect_callback_data, 1 ); 740 if( ( fd = proxy_connect( host, port, ( GaimInputFunction) byahoo_connect_callback, (gpointer) d ) ) < 0 )738 if( ( fd = proxy_connect( host, port, (b_event_handler) byahoo_connect_callback, (gpointer) d ) ) < 0 ) 741 739 { 742 740 g_free( d );
Note: See TracChangeset
for help on using the changeset viewer.