summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-08 10:28:05 +0100
committerVolker Lendecke <vl@samba.org>2009-03-08 11:21:00 +0100
commit1611e63ae5abd323502d062d9474acd6648ae959 (patch)
treec22d8fc1a4d6ad6357d16c5d97acc768a7c5507c /source3/lib
parent80fcd764213afc430f4b4cefec4e251e668bd0ba (diff)
downloadsamba-1611e63ae5abd323502d062d9474acd6648ae959.tar.gz
samba-1611e63ae5abd323502d062d9474acd6648ae959.tar.bz2
samba-1611e63ae5abd323502d062d9474acd6648ae959.zip
Convert wb_resp_write to tevent_req
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/wb_reqtrans.c25
1 files changed, 12 insertions, 13 deletions
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);
}