From 67d41d0fc7567cf141b12e866dd227d393e33551 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 28 Feb 2009 15:44:30 -0500 Subject: Make struct tevent_req opaque Move struct tevent_req in tevent_internal, and ad getters and setters for private data and the callback function. This patch also renames 'private_state' into 'data'. What is held in this pointer is in fact data and not a state like enum tevent_req_state. Calling it 'state' is confusing. The functions addedd are: tevent_req_set_callback() - sets req->async.fn and req->async.private_data tevent_req_set_print_fn() - sets req->private_print tevent_req_callback_data() - gets req->async.private_data tevent_req_data() - gets rea->data This way it is much simpler to keep API/ABI compatibility in the future. --- source3/lib/wb_reqtrans.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 65906dcb91..63a25fb896 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -103,8 +103,7 @@ struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx, goto nomem; } - subreq->async.fn = wb_req_read_done; - subreq->async.private_data = result; + tevent_req_set_callback(subreq, wb_req_read_done, result); return result; nomem: TALLOC_FREE(result); @@ -140,8 +139,8 @@ static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data) static void wb_req_read_done(struct tevent_req *subreq) { - struct async_req *req = talloc_get_type_abort( - subreq->async.private_data, struct async_req); + struct async_req *req = + tevent_req_callback_data(subreq, struct async_req); struct req_read_state *state = talloc_get_type_abort( req->private_data, struct req_read_state); int err; @@ -213,8 +212,7 @@ struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, if (subreq == NULL) { goto fail; } - subreq->async.fn = wb_req_write_done; - subreq->async.private_data = result; + tevent_req_set_callback(wb_req_write_done, result); return result; fail: @@ -224,8 +222,8 @@ struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, static void wb_req_write_done(struct tevent_req *subreq) { - struct async_req *req = talloc_get_type_abort( - subreq->async.private_data, struct async_req); + struct async_req *req = + tevent_req_callback_data(subreq, struct async_req); int err; ssize_t ret; @@ -266,8 +264,7 @@ struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, if (subreq == NULL) { goto nomem; } - subreq->async.fn = wb_resp_read_done; - subreq->async.private_data = result; + tevent_req_set_callback(subreq, wb_resp_read_done, result); return result; nomem: @@ -293,8 +290,8 @@ static ssize_t wb_resp_more(uint8_t *buf, size_t buflen, void *private_data) static void wb_resp_read_done(struct tevent_req *subreq) { - struct async_req *req = talloc_get_type_abort( - subreq->async.private_data, struct async_req); + struct async_req *req = + tevent_req_callback_data(subreq, struct async_req); struct resp_read_state *state = talloc_get_type_abort( req->private_data, struct resp_read_state); uint8_t *buf; @@ -367,8 +364,7 @@ struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, if (subreq == NULL) { goto fail; } - subreq->async.fn = wb_resp_write_done; - subreq->async.private_data = result; + tevent_req_set_callback(subreq, wb_resp_write_done, result); return result; fail: @@ -378,8 +374,8 @@ 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 = talloc_get_type_abort( - subreq->async.private_data, struct async_req); + struct async_req *req = + tevent_re_callback_data(subreq, struct async_req); int err; ssize_t ret; -- cgit From 9cacb49eb623edc1a74c90f4fd407dce334e75e4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 2 Mar 2009 20:10:13 +0100 Subject: Attempt to fix the build Simo, with which compiler did you build this? I'd be curious to learn about the compiler settings that make this build. Thanks, Volker --- source3/lib/wb_reqtrans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 63a25fb896..222b64667c 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -212,7 +212,7 @@ struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, if (subreq == NULL) { goto fail; } - tevent_req_set_callback(wb_req_write_done, result); + tevent_req_set_callback(subreq, wb_req_write_done, result); return result; fail: @@ -375,7 +375,7 @@ 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_re_callback_data(subreq, struct async_req); + tevent_req_callback_data(subreq, struct async_req); int err; ssize_t ret; -- cgit From fe486d7b9f580a17d23dd57582087c7d28cb738d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 1 Mar 2009 19:43:07 +0100 Subject: Add "queue" to writev_send Unless higher levels queue themselves somehow, writev will *always* be queued. So the queueing should be done at the right level. --- source3/lib/wb_reqtrans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 222b64667c..26dfb783ab 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -208,7 +208,7 @@ struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, count = 2; } - subreq = writev_send(state, ev, fd, state->iov, count); + subreq = writev_send(state, ev, NULL, fd, state->iov, count); if (subreq == NULL) { goto fail; } @@ -360,7 +360,7 @@ struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, count = 2; } - subreq = writev_send(state, ev, fd, state->iov, count); + subreq = writev_send(state, ev, NULL, fd, state->iov, count); if (subreq == NULL) { goto fail; } -- cgit From f5ee31602c7880b11dff82258764eb9a76cdc83b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 09:34:35 +0100 Subject: Add tevent_req wbc helpers --- source3/lib/wb_reqtrans.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 26dfb783ab..2051696a02 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -81,6 +81,43 @@ wbcErr async_req_simple_recv_wbcerr(struct async_req *req) return WBC_ERR_SUCCESS; } +bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err) +{ + enum tevent_req_state state; + uint64_t error; + if (!tevent_req_is_error(req, &state, &error)) { + *pwbc_err = WBC_ERR_SUCCESS; + return false; + } + + switch (state) { + case TEVENT_REQ_USER_ERROR: + *pwbc_err = error; + break; + case TEVENT_REQ_TIMED_OUT: + *pwbc_err = WBC_ERR_UNKNOWN_FAILURE; + break; + case TEVENT_REQ_NO_MEMORY: + *pwbc_err = WBC_ERR_NO_MEMORY; + break; + default: + *pwbc_err = WBC_ERR_UNKNOWN_FAILURE; + break; + } + return true; +} + +wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req) +{ + wbcErr wbc_err; + + if (tevent_req_is_wbcerr(req, &wbc_err)) { + return wbc_err; + } + + return WBC_ERR_SUCCESS; +} + static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data); static void wb_req_read_done(struct tevent_req *subreq); -- cgit From 9a64d7cfbedec6fc634b523c2185213c136a5074 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 09:35:13 +0100 Subject: Convert wb_req_write to tevent_req --- source3/lib/wb_reqtrans.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 2051696a02..9fcef0bb76 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -222,17 +222,17 @@ struct req_write_state { static void wb_req_write_done(struct tevent_req *subreq); -struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, int fd, - struct winbindd_request *wb_req) +struct tevent_req *wb_req_write_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct tevent_queue *queue, int fd, + struct winbindd_request *wb_req) { - struct async_req *result; - struct tevent_req *subreq; + struct tevent_req *result, *subreq; struct req_write_state *state; int count = 1; - if (!async_req_setup(mem_ctx, &result, &state, - struct req_write_state)) { + result = tevent_req_create(mem_ctx, &state, struct req_write_state); + if (result == NULL) { return NULL; } @@ -245,7 +245,7 @@ struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, count = 2; } - subreq = writev_send(state, ev, NULL, fd, state->iov, count); + subreq = writev_send(state, ev, queue, fd, state->iov, count); if (subreq == NULL) { goto fail; } @@ -259,23 +259,23 @@ struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, static void wb_req_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_req_write_recv(struct async_req *req) +wbcErr wb_req_write_recv(struct tevent_req *req) { - return async_req_simple_recv_wbcerr(req); + return tevent_req_simple_recv_wbcerr(req); } struct resp_read_state { -- cgit From 0a3a7d53eb4d573aa6b1a1b9a9d81b848e37ac7f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 10:04:04 +0100 Subject: Convert wb_req_read to tevent_req --- source3/lib/wb_reqtrans.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 9fcef0bb76..30e5f75062 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -121,16 +121,15 @@ wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req) static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data); static void wb_req_read_done(struct tevent_req *subreq); -struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - int fd, size_t max_extra_data) +struct tevent_req *wb_req_read_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + int fd, size_t max_extra_data) { - struct async_req *result; - struct tevent_req *subreq; + struct tevent_req *result, *subreq; struct req_read_state *state; - if (!async_req_setup(mem_ctx, &result, &state, - struct req_read_state)) { + result = tevent_req_create(mem_ctx, &state, struct req_read_state); + if (result == NULL) { return NULL; } state->max_extra_data = max_extra_data; @@ -176,10 +175,10 @@ static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data) static void wb_req_read_done(struct tevent_req *subreq) { - struct async_req *req = - tevent_req_callback_data(subreq, struct async_req); - struct req_read_state *state = talloc_get_type_abort( - req->private_data, struct req_read_state); + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct req_read_state *state = tevent_req_data( + req, struct req_read_state); int err; ssize_t ret; uint8_t *buf; @@ -187,7 +186,7 @@ static void wb_req_read_done(struct tevent_req *subreq) ret = read_packet_recv(subreq, state, &buf, &err); TALLOC_FREE(subreq); if (ret == -1) { - async_req_error(req, map_wbc_err_from_errno(err)); + tevent_req_error(req, map_wbc_err_from_errno(err)); return; } @@ -199,17 +198,17 @@ static void wb_req_read_done(struct tevent_req *subreq) } else { state->wb_req->extra_data.data = NULL; } - async_req_done(req); + tevent_req_done(req); } -wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, +wbcErr wb_req_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct winbindd_request **preq) { - struct req_read_state *state = talloc_get_type_abort( - req->private_data, struct req_read_state); + struct req_read_state *state = tevent_req_data( + req, struct req_read_state); wbcErr wbc_err; - if (async_req_is_wbcerr(req, &wbc_err)) { + if (tevent_req_is_wbcerr(req, &wbc_err)) { return wbc_err; } *preq = talloc_move(mem_ctx, &state->wb_req); -- cgit From 80fcd764213afc430f4b4cefec4e251e668bd0ba Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 10:20:27 +0100 Subject: Convert wb_resp_read to tevent_req --- source3/lib/wb_reqtrans.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 30e5f75062..1f7713b02d 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -284,15 +284,14 @@ struct resp_read_state { static ssize_t wb_resp_more(uint8_t *buf, size_t buflen, void *private_data); static void wb_resp_read_done(struct tevent_req *subreq); -struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, int fd) +struct tevent_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, int fd) { - struct async_req *result; - struct tevent_req *subreq; + struct tevent_req *result, *subreq; struct resp_read_state *state; - if (!async_req_setup(mem_ctx, &result, &state, - struct resp_read_state)) { + result = tevent_req_create(mem_ctx, &state, struct resp_read_state); + if (result == NULL) { return NULL; } @@ -326,10 +325,10 @@ static ssize_t wb_resp_more(uint8_t *buf, size_t buflen, void *private_data) static void wb_resp_read_done(struct tevent_req *subreq) { - struct async_req *req = - tevent_req_callback_data(subreq, struct async_req); - struct resp_read_state *state = talloc_get_type_abort( - req->private_data, struct resp_read_state); + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct resp_read_state *state = tevent_req_data( + req, struct resp_read_state); uint8_t *buf; int err; ssize_t ret; @@ -337,7 +336,7 @@ static void wb_resp_read_done(struct tevent_req *subreq) ret = read_packet_recv(subreq, state, &buf, &err); TALLOC_FREE(subreq); if (ret == -1) { - async_req_error(req, map_wbc_err_from_errno(err)); + tevent_req_error(req, map_wbc_err_from_errno(err)); return; } @@ -349,17 +348,17 @@ static void wb_resp_read_done(struct tevent_req *subreq) } else { state->wb_resp->extra_data.data = NULL; } - async_req_done(req); + tevent_req_done(req); } -wbcErr wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, +wbcErr wb_resp_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct winbindd_response **presp) { - struct resp_read_state *state = talloc_get_type_abort( - req->private_data, struct resp_read_state); + struct resp_read_state *state = tevent_req_data( + req, struct resp_read_state); wbcErr wbc_err; - if (async_req_is_wbcerr(req, &wbc_err)) { + if (tevent_req_is_wbcerr(req, &wbc_err)) { return wbc_err; } *presp = talloc_move(mem_ctx, &state->wb_resp); -- cgit From 1611e63ae5abd323502d062d9474acd6648ae959 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 10:28:05 +0100 Subject: Convert wb_resp_write to tevent_req --- source3/lib/wb_reqtrans.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') 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); } -- cgit From c7df04633969f3d50214fcc5916ed695208b9bf2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 10:29:15 +0100 Subject: Move "struct req_read_state" where it belongs --- source3/lib/wb_reqtrans.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index f1856be6dd..6ae1d1bb9b 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -25,11 +25,6 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND -struct req_read_state { - struct winbindd_request *wb_req; - size_t max_extra_data; -}; - bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err) { enum async_req_state state; @@ -118,6 +113,11 @@ wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req) return WBC_ERR_SUCCESS; } +struct req_read_state { + struct winbindd_request *wb_req; + size_t max_extra_data; +}; + static ssize_t wb_req_more(uint8_t *buf, size_t buflen, void *private_data); static void wb_req_read_done(struct tevent_req *subreq); -- cgit From 5fa4cf283f3f8bcf3c3399882f2e08ef902424c5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 15 Mar 2009 11:25:20 +0100 Subject: Add queue argument to wb_resp_write --- source3/lib/wb_reqtrans.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index 6ae1d1bb9b..e1c67491c0 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -372,7 +372,8 @@ struct resp_write_state { static void wb_resp_write_done(struct tevent_req *subreq); struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, int fd, + struct tevent_context *ev, + struct tevent_queue *queue, int fd, struct winbindd_response *wb_resp) { struct tevent_req *result, *subreq; @@ -394,7 +395,7 @@ struct tevent_req *wb_resp_write_send(TALLOC_CTX *mem_ctx, count = 2; } - subreq = writev_send(state, ev, NULL, fd, state->iov, count); + subreq = writev_send(state, ev, queue, fd, state->iov, count); if (subreq == NULL) { goto fail; } -- cgit From 8a2b7b3e56230c46df9ae3820578a2f3e765d32d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 16 Mar 2009 21:02:26 +0100 Subject: Remove unused async_req references from wb_reqtrans.c --- source3/lib/wb_reqtrans.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'source3/lib/wb_reqtrans.c') diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c index e1c67491c0..dbea8b6686 100644 --- a/source3/lib/wb_reqtrans.c +++ b/source3/lib/wb_reqtrans.c @@ -25,32 +25,6 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND -bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err) -{ - enum async_req_state state; - uint64_t error; - if (!async_req_is_error(req, &state, &error)) { - *pwbc_err = WBC_ERR_SUCCESS; - return false; - } - - switch (state) { - case ASYNC_REQ_USER_ERROR: - *pwbc_err = error; - break; - case ASYNC_REQ_TIMED_OUT: - *pwbc_err = WBC_ERR_UNKNOWN_FAILURE; - break; - case ASYNC_REQ_NO_MEMORY: - *pwbc_err = WBC_ERR_NO_MEMORY; - break; - default: - *pwbc_err = WBC_ERR_UNKNOWN_FAILURE; - break; - } - return true; -} - wbcErr map_wbc_err_from_errno(int error) { switch(error) { @@ -65,17 +39,6 @@ wbcErr map_wbc_err_from_errno(int error) } } -wbcErr async_req_simple_recv_wbcerr(struct async_req *req) -{ - wbcErr wbc_err; - - if (async_req_is_wbcerr(req, &wbc_err)) { - return wbc_err; - } - - return WBC_ERR_SUCCESS; -} - bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err) { enum tevent_req_state state; -- cgit