diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-02-25 16:40:17 -0500 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-02-26 09:13:20 -0500 |
commit | c9f6d2795fde2f9bf80277d425df2b44bc860226 (patch) | |
tree | 301e1217eb5fda73351e9c7fb2f73048853942df /server/responder/common/responder_common.c | |
parent | 03fa4034a6a74a326e5340dae42d85eea4516b3c (diff) | |
download | sssd-c9f6d2795fde2f9bf80277d425df2b44bc860226.tar.gz sssd-c9f6d2795fde2f9bf80277d425df2b44bc860226.tar.bz2 sssd-c9f6d2795fde2f9bf80277d425df2b44bc860226.zip |
Rebase the code to use talloc, tdb, tevent, ldb as external
dependencies based on the latest samba code.
Convert all references to the old events library to use the
renamed tevent library.
Diffstat (limited to 'server/responder/common/responder_common.c')
-rw-r--r-- | server/responder/common/responder_common.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/server/responder/common/responder_common.c b/server/responder/common/responder_common.c index b5db7d1e..74e03215 100644 --- a/server/responder/common/responder_common.c +++ b/server/responder/common/responder_common.c @@ -65,7 +65,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; @@ -81,14 +81,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; @@ -115,7 +115,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 = sss_cmd_execute(cctx, cctx->nctx->sss_cmds); if (ret != EOK) { @@ -148,24 +148,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 */ @@ -197,8 +197,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); @@ -303,8 +303,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 */ @@ -422,7 +422,7 @@ done: } int sss_process_init(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct confdb_ctx *cdb, struct sbus_method sss_sbus_methods[], struct sss_cmd_table sss_cmds[], |