diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/events.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c index c71876ce39..64ea3ad719 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -59,7 +59,7 @@ static void count_fds(struct tevent_context *ev, int max_fd = 0; for (fde = ev->fd_events; fde != NULL; fde = fde->next) { - if (fde->flags & (EVENT_FD_READ|EVENT_FD_WRITE)) { + if (fde->flags & (TEVENT_FD_READ|TEVENT_FD_WRITE)) { num_fds += 1; if (fde->fd > max_fd) { max_fd = fde->fd; @@ -126,7 +126,7 @@ bool event_add_to_poll_args(struct tevent_context *ev, TALLOC_CTX *mem_ctx, for (fde = ev->fd_events; fde; fde = fde->next) { struct pollfd *pfd; - if ((fde->flags & (EVENT_FD_READ|EVENT_FD_WRITE)) == 0) { + if ((fde->flags & (TEVENT_FD_READ|TEVENT_FD_WRITE)) == 0) { continue; } @@ -146,10 +146,10 @@ bool event_add_to_poll_args(struct tevent_context *ev, TALLOC_CTX *mem_ctx, pfd->fd = fde->fd; - if (fde->flags & EVENT_FD_READ) { + if (fde->flags & TEVENT_FD_READ) { pfd->events |= (POLLIN|POLLHUP); } - if (fde->flags & EVENT_FD_WRITE) { + if (fde->flags & TEVENT_FD_WRITE) { pfd->events |= POLLOUT; } } @@ -238,7 +238,7 @@ bool run_events_poll(struct tevent_context *ev, int pollrtn, struct pollfd *pfd; uint16 flags = 0; - if ((fde->flags & (EVENT_FD_READ|EVENT_FD_WRITE)) == 0) { + if ((fde->flags & (TEVENT_FD_READ|TEVENT_FD_WRITE)) == 0) { continue; } @@ -463,8 +463,8 @@ struct idle_event { void *private_data; }; -static void smbd_idle_event_handler(struct event_context *ctx, - struct timed_event *te, +static void smbd_idle_event_handler(struct tevent_context *ctx, + struct timer_event *te, struct timeval now, void *private_data) { @@ -487,15 +487,15 @@ static void smbd_idle_event_handler(struct event_context *ctx, DEBUG(10,("smbd_idle_event_handler: %s %p rescheduled\n", event->name, event->te)); - event->te = event_add_timed(ctx, event, - timeval_sum(&now, &event->interval), - smbd_idle_event_handler, event); + event->te = tevent_add_timer(ctx, event, + timeval_sum(&now, &event->interval), + smbd_idle_event_handler, event); /* We can't do much but fail here. */ SMB_ASSERT(event->te != NULL); } -struct idle_event *event_add_idle(struct event_context *event_ctx, +struct idle_event *event_add_idle(struct tevent_context *event_ctx, TALLOC_CTX *mem_ctx, struct timeval interval, const char *name, @@ -522,9 +522,9 @@ struct idle_event *event_add_idle(struct event_context *event_ctx, return NULL; } - result->te = event_add_timed(event_ctx, result, - timeval_sum(&now, &interval), - smbd_idle_event_handler, result); + result->te = tevent_add_timer(event_ctx, result, + timeval_sum(&now, &interval), + smbd_idle_event_handler, result); if (result->te == NULL) { DEBUG(0, ("event_add_timed failed\n")); TALLOC_FREE(result); |