summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/wbc_async.h9
-rw-r--r--source3/lib/wb_reqtrans.c25
2 files changed, 16 insertions, 18 deletions
diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
index 27af31f27a..5aac64d48e 100644
--- a/source3/include/wbc_async.h
+++ b/source3/include/wbc_async.h
@@ -60,10 +60,9 @@ struct tevent_req *wb_resp_read_send(TALLOC_CTX *mem_ctx,
wbcErr wb_resp_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
struct winbindd_response **presp);
-struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev, int fd,
- struct winbindd_response *wb_resp);
-
-wbcErr wb_resp_write_recv(struct async_req *req);
+struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd,
+ struct winbindd_response *wb_resp);
+wbcErr wb_resp_write_recv(struct tevent_req *req);
#endif /*_WBC_ASYNC_H_*/
diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c
index 1f7713b02d..f1856be6dd 100644
--- a/source3/lib/wb_reqtrans.c
+++ b/source3/lib/wb_reqtrans.c
@@ -371,17 +371,16 @@ struct resp_write_state {
static void wb_resp_write_done(struct tevent_req *subreq);
-struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev, int fd,
- struct winbindd_response *wb_resp)
+struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd,
+ struct winbindd_response *wb_resp)
{
- struct async_req *result;
- struct tevent_req *subreq;
+ struct tevent_req *result, *subreq;
struct resp_write_state *state;
int count = 1;
- if (!async_req_setup(mem_ctx, &result, &state,
- struct resp_write_state)) {
+ result = tevent_req_create(mem_ctx, &state, struct resp_write_state);
+ if (result == NULL) {
return NULL;
}
@@ -409,21 +408,21 @@ struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
static void wb_resp_write_done(struct tevent_req *subreq)
{
- struct async_req *req =
- tevent_req_callback_data(subreq, struct async_req);
+ struct tevent_req *req = tevent_req_callback_data(
+ subreq, struct tevent_req);
int err;
ssize_t ret;
ret = writev_recv(subreq, &err);
TALLOC_FREE(subreq);
if (ret < 0) {
- async_req_error(req, map_wbc_err_from_errno(err));
+ tevent_req_error(req, map_wbc_err_from_errno(err));
return;
}
- async_req_done(req);
+ tevent_req_done(req);
}
-wbcErr wb_resp_write_recv(struct async_req *req)
+wbcErr wb_resp_write_recv(struct tevent_req *req)
{
- return async_req_simple_recv_wbcerr(req);
+ return tevent_req_simple_recv_wbcerr(req);
}