Changes in / [c2ee85c:85cf37f]


Ignore:
Location:
protocols
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • protocols/events.h

    rc2ee85c r85cf37f  
    5959G_MODULE_EXPORT gint b_timeout_add(gint timeout, b_event_handler func, gpointer data);
    6060G_MODULE_EXPORT void b_event_remove(gint id);
     61G_MODULE_EXPORT gboolean b_event_remove_by_data(gpointer data);
    6162
    6263#ifdef EVENTS_LIBEVENT
  • protocols/events_glib.c

    rc2ee85c r85cf37f  
    136136                g_source_remove(tag);
    137137}
     138
     139gboolean b_event_remove_by_data(gpointer data)
     140{
     141        return g_source_remove_by_user_data(data);
     142}
  • protocols/events_libevent.c

    rc2ee85c r85cf37f  
    212212}
    213213
     214gboolean b_event_remove_by_data( gpointer data )
     215{
     216        /* FIXME! */
     217        event_debug( "FALSE!\n" );
     218        return FALSE;
     219}
     220
    214221void closesocket( int fd )
    215222{
     
    222229           properly before closing a socket. */
    223230       
    224         if( ( b_ev = g_hash_table_lookup( read_hash, &fd ) ) )
     231        if( b_ev = g_hash_table_lookup( read_hash, &fd ) )
    225232        {
    226233                event_debug( "Warning: fd %d still had a read event handler when shutting down.\n", fd );
    227234                b_event_remove( b_ev->id );
    228235        }
    229         if( ( b_ev = g_hash_table_lookup( write_hash, &fd ) ) )
     236        if( b_ev = g_hash_table_lookup( write_hash, &fd ) )
    230237        {
    231238                event_debug( "Warning: fd %d still had a write event handler when shutting down.\n", fd );
  • protocols/nogaim.c

    rc2ee85c r85cf37f  
    248248         * This fixes daemon mode breakage where IRC doesn't point to the currently active connection.
    249249         */
    250         gc->irc = user->irc;
     250        gc->irc=user->irc;
    251251       
    252252        connections = g_slist_append( connections, gc );
     
    372372void cancel_auto_reconnect( account_t *a )
    373373{
    374         /* while( b_event_remove_by_data( (gpointer) a ) ); */
    375         b_event_remove( a->reconnect );
     374        while( b_event_remove_by_data( (gpointer) a ) );
    376375        a->reconnect = 0;
    377376}
     
    415414        {
    416415                int delay = set_getint( irc, "auto_reconnect_delay" );
    417                
    418416                serv_got_crap( gc, "Reconnecting in %d seconds..", delay );
    419                 a->reconnect = b_timeout_add( delay * 1000, auto_reconnect, a );
     417               
     418                a->reconnect = 1;
     419                b_timeout_add( delay * 1000, auto_reconnect, a );
    420420        }
    421421       
  • protocols/yahoo/yahoo.c

    rc2ee85c r85cf37f  
    470470       
    471471        if( !byahoo_get_gc_by_id( d->id ) )
     472        {
    472473                /* WTF doesn't libyahoo clean this up? */
     474                ext_yahoo_remove_handler( d->id, d->tag );
    473475                return FALSE;
     476        }
    474477       
    475478        yahoo_read_ready( d->id, d->fd, d->data );
    476        
    477         return TRUE;
    478479}
    479480
     
    491492       
    492493        if( !byahoo_get_gc_by_id( d->id ) )
     494        {
    493495                /* WTF doesn't libyahoo clean this up? */
     496                ext_yahoo_remove_handler( d->id, d->tag );
    494497                return FALSE;
     498        }
    495499       
    496500        yahoo_write_ready( d->id, d->fd, d->data );
    497        
    498         return FALSE;
    499501}
    500502
Note: See TracChangeset for help on using the changeset viewer.