Skip to content

Commit

Permalink
bug fix in event_once by Jody Belka <knew@pimb.org>
Browse files Browse the repository at this point in the history
svn:r134
  • Loading branch information
provos committed Mar 12, 2005
1 parent c5e4eee commit da971e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions event.c
Expand Up @@ -423,15 +423,15 @@ event_once(int fd, short events,
if ((eonce = calloc(1, sizeof(struct event_once))) == NULL)
return (-1);

eonce->cb = callback;
eonce->arg = arg;

if (events == EV_TIMEOUT) {
if (tv == NULL) {
timerclear(&etv);
tv = &etv;
}

eonce->cb = callback;
eonce->arg = arg;

evtimer_set(&eonce->ev, event_once_cb, eonce);
} else if (events & (EV_READ|EV_WRITE)) {
events &= EV_READ|EV_WRITE;
Expand Down

0 comments on commit da971e5

Please sign in to comment.