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/include/wbc_async.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index 7a8768029a..0ae6c695f0 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -40,6 +40,9 @@ bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err); wbcErr map_wbc_err_from_errno(int error); wbcErr async_req_simple_recv_wbcerr(struct async_req *req); +bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err); +wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req); + struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd, size_t max_extra_data); -- 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/include/wbc_async.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index 0ae6c695f0..b90a3b71d8 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -50,11 +50,11 @@ struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx, wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, struct winbindd_request **preq); -struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, int fd, - struct winbindd_request *wb_req); - -wbcErr wb_req_write_recv(struct async_req *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); +wbcErr wb_req_write_recv(struct tevent_req *req); struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd); -- 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/include/wbc_async.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index b90a3b71d8..b355c8fc9f 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -43,11 +43,10 @@ wbcErr async_req_simple_recv_wbcerr(struct async_req *req); bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err); wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req); -struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - int fd, size_t max_extra_data); - -wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, +struct tevent_req *wb_req_read_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + int fd, size_t max_extra_data); +wbcErr wb_req_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct winbindd_request **preq); struct tevent_req *wb_req_write_send(TALLOC_CTX *mem_ctx, -- 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/include/wbc_async.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index b355c8fc9f..27af31f27a 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -55,10 +55,9 @@ struct tevent_req *wb_req_write_send(TALLOC_CTX *mem_ctx, struct winbindd_request *wb_req); wbcErr wb_req_write_recv(struct tevent_req *req); -struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, int fd); - -wbcErr wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx, +struct tevent_req *wb_resp_read_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, int fd); +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, -- 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/include/wbc_async.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/include/wbc_async.h') 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_*/ -- cgit From dea9621680062b3726ad15cbec4a9d2cf7ce824e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 8 Mar 2009 12:25:10 +0100 Subject: Don't copy the winbindd_request in wb_trans --- source3/include/wbc_async.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index 5aac64d48e..b5e769f8c3 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -30,7 +30,7 @@ struct wb_context { 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); + struct winbindd_request *wb_req); wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx, struct winbindd_response **presponse); struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx); -- 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/include/wbc_async.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index b5e769f8c3..fd9b669710 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -61,7 +61,8 @@ wbcErr wb_resp_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct winbindd_response **presp); 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); wbcErr wb_resp_write_recv(struct tevent_req *req); -- cgit From a58eccfee742bcecbd4a2e5662305c5077024244 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 16 Mar 2009 20:23:37 +0100 Subject: Make struct wb_context private to wbclient.c --- source3/include/wbc_async.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index fd9b669710..987c32320c 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -22,11 +22,7 @@ #include "nsswitch/libwbclient/wbclient.h" -struct wb_context { - struct async_req_queue *queue; - int fd; - bool is_priv; -}; +struct wb_context; struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct wb_context *wb_ctx, bool need_priv, -- cgit From 05b49fd4c8aaf779b98eb2eabb860295dc1300b9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 16 Mar 2009 20:38:11 +0100 Subject: Convert wb_trans to tevent_req --- source3/include/wbc_async.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index 987c32320c..37f500ea1c 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -24,10 +24,11 @@ struct wb_context; -struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, - struct wb_context *wb_ctx, bool need_priv, - struct winbindd_request *wb_req); -wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx, +struct tevent_req *wb_trans_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct wb_context *wb_ctx, bool need_priv, + struct winbindd_request *wb_req); +wbcErr wb_trans_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct winbindd_response **presponse); struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx); -- 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/include/wbc_async.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/include/wbc_async.h') diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h index 37f500ea1c..eaec0d11da 100644 --- a/source3/include/wbc_async.h +++ b/source3/include/wbc_async.h @@ -33,9 +33,7 @@ wbcErr wb_trans_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx); /* Definitions from wb_reqtrans.c */ -bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err); wbcErr map_wbc_err_from_errno(int error); -wbcErr async_req_simple_recv_wbcerr(struct async_req *req); bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err); wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req); -- cgit