Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    r5b52a48 r5a348c3  
    121121}
    122122
    123 static void byahoo_login( account_t *acc )
    124 {
    125         struct gaim_connection *gc = new_gaim_conn( acc );
     123static void byahoo_login( struct aim_user *user )
     124{
     125        struct gaim_connection *gc = new_gaim_conn( user );
    126126        struct byahoo_data *yd = gc->proto_data = g_new0( struct byahoo_data, 1 );
    127127       
     
    130130       
    131131        set_login_progress( gc, 1, "Connecting" );
    132         yd->y2_id = yahoo_init( acc->user, acc->pass );
     132        yd->y2_id = yahoo_init( user->username, user->password );
    133133        yahoo_login( yd->y2_id, yd->current_status );
    134134}
     
    409409        ret->chat_leave = byahoo_chat_leave;
    410410        ret->chat_open = byahoo_chat_open;
    411 
    412         ret->handle_cmp = g_strcasecmp;
     411        ret->cmp_buddynames = g_strcasecmp;
    413412       
    414413        register_protocol(ret);
     
    426425                yd = gc->proto_data;
    427426               
    428                 if( strcmp( gc->acc->prpl->name, "yahoo" ) == 0 && yd->y2_id == id )
     427                if( !strcmp(gc->prpl->name, "yahoo") && yd->y2_id == id )
    429428                        return( gc );
    430429        }
     
    444443};
    445444
    446 void byahoo_connect_callback( gpointer data, gint source, b_input_condition cond )
     445void byahoo_connect_callback( gpointer data, gint source, GaimInputCondition cond )
    447446{
    448447        struct byahoo_connect_callback_data *d = data;
     
    466465};
    467466
    468 gboolean byahoo_read_ready_callback( gpointer data, gint source, b_input_condition cond )
     467void byahoo_read_ready_callback( gpointer data, gint source, GaimInputCondition cond )
    469468{
    470469        struct byahoo_read_ready_data *d = data;
    471470       
    472471        if( !byahoo_get_gc_by_id( d->id ) )
     472        {
    473473                /* WTF doesn't libyahoo clean this up? */
    474                 return FALSE;
     474                ext_yahoo_remove_handler( d->id, d->tag );
     475                return;
     476        }
    475477       
    476478        yahoo_read_ready( d->id, d->fd, d->data );
    477        
    478         return TRUE;
    479479}
    480480
     
    487487};
    488488
    489 gboolean byahoo_write_ready_callback( gpointer data, gint source, b_input_condition cond )
     489void byahoo_write_ready_callback( gpointer data, gint source, GaimInputCondition cond )
    490490{
    491491        struct byahoo_write_ready_data *d = data;
    492492       
    493493        if( !byahoo_get_gc_by_id( d->id ) )
     494        {
    494495                /* WTF doesn't libyahoo clean this up? */
    495                 return FALSE;
     496                ext_yahoo_remove_handler( d->id, d->tag );
     497                return;
     498        }
    496499       
    497500        yahoo_write_ready( d->id, d->fd, d->data );
    498        
    499         return FALSE;
    500501}
    501502
     
    686687               
    687688                inp->d = d;
    688                 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_READ, (b_event_handler) byahoo_read_ready_callback, (gpointer) d );
     689                d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_READ, (GaimInputFunction) byahoo_read_ready_callback, (gpointer) d );
    689690        }
    690691        else if( cond == YAHOO_INPUT_WRITE )
     
    697698               
    698699                inp->d = d;
    699                 d->tag = inp->h = b_input_add( fd, GAIM_INPUT_WRITE, (b_event_handler) byahoo_write_ready_callback, (gpointer) d );
     700                d->tag = inp->h = gaim_input_add( fd, GAIM_INPUT_WRITE, (GaimInputFunction) byahoo_write_ready_callback, (gpointer) d );
    700701        }
    701702        else
     
    728729        }
    729730       
    730         b_event_remove( tag );
     731        gaim_input_remove( tag );
    731732}
    732733
     
    737738       
    738739        d = g_new0( struct byahoo_connect_callback_data, 1 );
    739         if( ( fd = proxy_connect( host, port, (b_event_handler) byahoo_connect_callback, (gpointer) d ) ) < 0 )
     740        if( ( fd = proxy_connect( host, port, (GaimInputFunction) byahoo_connect_callback, (gpointer) d ) ) < 0 )
    740741        {
    741742                g_free( d );
Note: See TracChangeset for help on using the changeset viewer.