From 03ba7182d3e525203cd8535ce154a94242a6f511 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Oct 2008 04:25:25 +0000 Subject: *** empty log message *** --- ev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ev.c') diff --git a/ev.c b/ev.c index b20112e..4e86506 100644 --- a/ev.c +++ b/ev.c @@ -3014,13 +3014,17 @@ once_cb (EV_P_ struct ev_once *once, int revents) static void once_cb_io (EV_P_ ev_io *w, int revents) { - once_cb (EV_A_ (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)), revents); + struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)); + + once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->to)); } static void once_cb_to (EV_P_ ev_timer *w, int revents) { - once_cb (EV_A_ (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)), revents); + struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)); + + once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->io)); } void -- cgit v1.2.3