summaryrefslogtreecommitdiff
path: root/server/responder/nss/nsssrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/responder/nss/nsssrv.c')
-rw-r--r--server/responder/nss/nsssrv.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/server/responder/nss/nsssrv.c b/server/responder/nss/nsssrv.c
index 93490c46..0c5fd4cc 100644
--- a/server/responder/nss/nsssrv.c
+++ b/server/responder/nss/nsssrv.c
@@ -78,7 +78,7 @@ static int client_destructor(struct cli_ctx *ctx)
return 0;
}
-static void client_send(struct event_context *ev, struct cli_ctx *cctx)
+static void client_send(struct tevent_context *ev, struct cli_ctx *cctx)
{
int ret;
@@ -94,14 +94,14 @@ static void client_send(struct event_context *ev, struct cli_ctx *cctx)
}
/* ok all sent */
- EVENT_FD_NOT_WRITEABLE(cctx->cfde);
- EVENT_FD_READABLE(cctx->cfde);
+ TEVENT_FD_NOT_WRITEABLE(cctx->cfde);
+ TEVENT_FD_READABLE(cctx->cfde);
talloc_free(cctx->creq);
cctx->creq = NULL;
return;
}
-static void client_recv(struct event_context *ev, struct cli_ctx *cctx)
+static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx)
{
int ret;
@@ -128,7 +128,7 @@ static void client_recv(struct event_context *ev, struct cli_ctx *cctx)
switch (ret) {
case EOK:
/* do not read anymore */
- EVENT_FD_NOT_READABLE(cctx->cfde);
+ TEVENT_FD_NOT_READABLE(cctx->cfde);
/* execute command */
ret = nss_cmd_execute(cctx);
if (ret != EOK) {
@@ -161,24 +161,24 @@ static void client_recv(struct event_context *ev, struct cli_ctx *cctx)
return;
}
-static void client_fd_handler(struct event_context *ev,
- struct fd_event *fde,
+static void client_fd_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *ptr)
{
struct cli_ctx *cctx = talloc_get_type(ptr, struct cli_ctx);
- if (flags & EVENT_FD_READ) {
+ if (flags & TEVENT_FD_READ) {
client_recv(ev, cctx);
return;
}
- if (flags & EVENT_FD_WRITE) {
+ if (flags & TEVENT_FD_WRITE) {
client_send(ev, cctx);
return;
}
}
-static void accept_fd_handler(struct event_context *ev,
- struct fd_event *fde,
+static void accept_fd_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
uint16_t flags, void *ptr)
{
/* accept and attach new event handler */
@@ -210,8 +210,8 @@ static void accept_fd_handler(struct event_context *ev,
return;
}
- cctx->cfde = event_add_fd(ev, cctx, cctx->cfd,
- EVENT_FD_READ, client_fd_handler, cctx);
+ cctx->cfde = tevent_add_fd(ev, cctx, cctx->cfd,
+ TEVENT_FD_READ, client_fd_handler, cctx);
if (!cctx->cfde) {
close(cctx->cfd);
talloc_free(cctx);
@@ -376,8 +376,8 @@ static int set_unix_socket(struct nss_ctx *nctx)
goto failed;
}
- nctx->lfde = event_add_fd(nctx->ev, nctx, nctx->lfd,
- EVENT_FD_READ, accept_fd_handler, nctx);
+ nctx->lfde = tevent_add_fd(nctx->ev, nctx, nctx->lfd,
+ TEVENT_FD_READ, accept_fd_handler, nctx);
/* we want default permissions on created files to be very strict,
so set our umask to 0177 */
@@ -495,7 +495,7 @@ done:
}
int nss_process_init(TALLOC_CTX *mem_ctx,
- struct event_context *ev,
+ struct tevent_context *ev,
struct confdb_ctx *cdb)
{
struct nss_ctx *nctx;