Ignore:
Timestamp:
2006-05-13T10:29:53Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2b7d2d1
Parents:
b642f381
Message:

It works, it works! \o/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/events_libevent.c

    rb642f381 rfc2ee0f  
    7272        struct b_event_data *b_ev = data;
    7373        b_input_condition cond = 0;
     74        int id;
    7475       
    7576        if( fd >= 0 )
     
    8384        event_debug( "b_event_passthrough( %d, %d, 0x%x ) (%d)\n", fd, event, (int) data, b_ev->id );
    8485       
     86        /* Since the called function might cancel this handler already
     87           (which free()s b_ev, we have to remember the ID here. */
     88        id = b_ev->id;
     89       
    8590        if( !b_ev->function( b_ev->data, fd, cond ) )
    8691        {
    8792                event_debug( "Handler returned FALSE: " );
    88                 b_event_remove( b_ev->id );
     93                b_event_remove( id );
    8994        }
    9095}
     
    151156        else
    152157        {
    153                 event_debug( "Invalid?\n" );
     158                event_debug( "Double remove?\n" );
    154159        }
    155160}
Note: See TracChangeset for help on using the changeset viewer.