diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-06-11 14:53:20 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-06-15 09:18:33 +0200 |
commit | 8e31d97c8b62d34aff5d52bfe46dbcc5805dae03 (patch) | |
tree | c6673bb4f6a4022c885f78e44952736225c335a6 | |
parent | bf3235f8c6159e238226bef59f39c46ecc6888d8 (diff) | |
download | samba-8e31d97c8b62d34aff5d52bfe46dbcc5805dae03.tar.gz samba-8e31d97c8b62d34aff5d52bfe46dbcc5805dae03.tar.bz2 samba-8e31d97c8b62d34aff5d52bfe46dbcc5805dae03.zip |
s3-lib: Convert lib/events.c to modern tevent names
-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); |