Re: [Libevent-users] event_add() failure return handling

2007-09-18 Thread M.H.VanLeeuwen
Christopher Layne wrote: On Tue, Sep 18, 2007 at 10:10:42PM -0500, M.H.VanLeeuwen wrote: Hi, When event_add(&ev, &tv) returns -1, what is the proper way to clean up. For example function XYZZY() takes socket fd as an argument XYZZY(int sockfd) { allocate event structure related memory... .

Re: [Libevent-users] event_add() failure return handling

2007-09-18 Thread Christopher Layne
On Tue, Sep 18, 2007 at 10:10:42PM -0500, M.H.VanLeeuwen wrote: > Hi, > > When event_add(&ev, &tv) returns -1, what is the proper way to clean up. > > For example function XYZZY() takes socket fd as an argument > > XYZZY(int sockfd) > { > allocate event structure related memory... > ... >

[Libevent-users] event_add() failure return handling

2007-09-18 Thread M.H.VanLeeuwen
Hi, When event_add(&ev, &tv) returns -1, what is the proper way to clean up. For example function XYZZY() takes socket fd as an argument XYZZY(int sockfd) { allocate event structure related memory... ... event_set(&(event->event), sockfd, EV_TIMEOUT | EV_WRITE | EV_PERSIST, connected, &(