diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
commit | 6d139ca4680abcbda5110f2f0886aa038ff62088 (patch) | |
tree | 7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/lib/wbclient.c | |
parent | 4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff) | |
parent | afa960cbbcd609123d710c301e7a9a070c1fed70 (diff) | |
download | samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2 samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
librpc/ndr.pc.in
Diffstat (limited to 'source3/lib/wbclient.c')
-rw-r--r-- | source3/lib/wbclient.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source3/lib/wbclient.c b/source3/lib/wbclient.c index ea0bcb512e..ae9a034cc8 100644 --- a/source3/lib/wbclient.c +++ b/source3/lib/wbclient.c @@ -155,7 +155,7 @@ struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx) } static struct async_req *wb_connect_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct wb_context *wb_ctx, const char *dir) { @@ -232,7 +232,7 @@ static struct async_req *wb_connect_send(TALLOC_CTX *mem_ctx, if (req == NULL) { return NULL; } - if (async_post_status(req, ev, status)) { + if (async_post_ntstatus(req, ev, status)) { return req; } TALLOC_FREE(req); @@ -272,7 +272,7 @@ static struct winbindd_request *winbindd_request_copy( } struct wb_int_trans_state { - struct event_context *ev; + struct tevent_context *ev; int fd; struct winbindd_request *wb_req; struct winbindd_response *wb_resp; @@ -282,7 +282,7 @@ static void wb_int_trans_write_done(struct async_req *subreq); static void wb_int_trans_read_done(struct async_req *subreq); static struct async_req *wb_int_trans_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, int fd, + struct tevent_context *ev, int fd, struct winbindd_request *wb_req) { struct async_req *result; @@ -295,8 +295,8 @@ static struct async_req *wb_int_trans_send(TALLOC_CTX *mem_ctx, } if (winbind_closed_fd(fd)) { - if (!async_post_status(result, ev, - NT_STATUS_PIPE_DISCONNECTED)) { + if (!async_post_ntstatus(result, ev, + NT_STATUS_PIPE_DISCONNECTED)) { goto fail; } return result; @@ -334,13 +334,13 @@ static void wb_int_trans_write_done(struct async_req *subreq) status = wb_req_write_recv(subreq); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - async_req_error(req, status); + async_req_nterror(req, status); return; } subreq = wb_resp_read_send(state, state->ev, state->fd); if (subreq == NULL) { - async_req_error(req, NT_STATUS_NO_MEMORY); + async_req_nterror(req, NT_STATUS_NO_MEMORY); } subreq->async.fn = wb_int_trans_read_done; subreq->async.priv = req; @@ -357,7 +357,7 @@ static void wb_int_trans_read_done(struct async_req *subreq) status = wb_resp_read_recv(subreq, state, &state->wb_resp); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - async_req_error(req, status); + async_req_nterror(req, status); return; } @@ -372,7 +372,7 @@ static NTSTATUS wb_int_trans_recv(struct async_req *req, req->private_data, struct wb_int_trans_state); NTSTATUS status; - if (async_req_is_error(req, &status)) { + if (async_req_is_nterror(req, &status)) { return status; } @@ -396,7 +396,7 @@ static const char *winbindd_socket_dir(void) struct wb_open_pipe_state { struct wb_context *wb_ctx; - struct event_context *ev; + struct tevent_context *ev; bool need_priv; struct winbindd_request wb_req; }; @@ -407,7 +407,7 @@ static void wb_open_pipe_getpriv_done(struct async_req *subreq); static void wb_open_pipe_connect_priv_done(struct async_req *subreq); static struct async_req *wb_open_pipe_send(TALLOC_CTX *mem_ctx, - struct event_context *ev, + struct tevent_context *ev, struct wb_context *wb_ctx, bool need_priv) { @@ -454,7 +454,7 @@ static void wb_open_pipe_connect_nonpriv_done(struct async_req *subreq) TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { state->wb_ctx->is_priv = true; - async_req_error(req, status); + async_req_nterror(req, status); return; } @@ -483,7 +483,7 @@ static void wb_open_pipe_ping_done(struct async_req *subreq) status = wb_int_trans_recv(subreq, state, &wb_resp); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - async_req_error(req, status); + async_req_nterror(req, status); return; } @@ -516,7 +516,7 @@ static void wb_open_pipe_getpriv_done(struct async_req *subreq) status = wb_int_trans_recv(subreq, state, &wb_resp); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - async_req_error(req, status); + async_req_nterror(req, status); return; } @@ -545,7 +545,7 @@ static void wb_open_pipe_connect_priv_done(struct async_req *subreq) status = wb_connect_recv(subreq); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { - async_req_error(req, status); + async_req_nterror(req, status); return; } state->wb_ctx->is_priv = true; @@ -554,13 +554,13 @@ static void wb_open_pipe_connect_priv_done(struct async_req *subreq) static NTSTATUS wb_open_pipe_recv(struct async_req *req) { - return async_req_simple_recv(req); + return async_req_simple_recv_ntstatus(req); } struct wb_trans_state { struct wb_trans_state *prev, *next; struct wb_context *wb_ctx; - struct event_context *ev; + struct tevent_context *ev; struct winbindd_request *wb_req; struct winbindd_response *wb_resp; int num_retries; @@ -599,7 +599,7 @@ static void wb_trigger_trans(struct async_req *req) subreq->async.priv = req; } -struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct event_context *ev, +struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct wb_context *wb_ctx, bool need_priv, const struct winbindd_request *wb_req) { @@ -645,13 +645,13 @@ static bool wb_trans_retry(struct async_req *req, * Winbind not around or we can't connect to the pipe. Fail * immediately. */ - async_req_error(req, status); + async_req_nterror(req, status); return true; } state->num_retries -= 1; if (state->num_retries == 0) { - async_req_error(req, status); + async_req_nterror(req, status); return true; } @@ -680,12 +680,12 @@ static void wb_trans_retry_wait_done(struct async_req *subreq) subreq->async.priv, struct async_req); struct wb_trans_state *state = talloc_get_type_abort( req->private_data, struct wb_trans_state); - NTSTATUS status; + bool ret; - status = async_wait_recv(subreq); + ret = async_wait_recv(subreq); TALLOC_FREE(subreq); - if (!NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { - async_req_error(req, status); + if (ret) { + async_req_nterror(req, NT_STATUS_INTERNAL_ERROR); return; } @@ -748,7 +748,7 @@ NTSTATUS wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx, req->private_data, struct wb_trans_state); NTSTATUS status; - if (async_req_is_error(req, &status)) { + if (async_req_is_nterror(req, &status)) { return status; } |