From fd3eeb3878c94bfb8d2134dbdc17cfb5279d088c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 25 Apr 2010 11:42:44 +0200 Subject: [PATCH] s3: async_domain_request is no longer used --- source3/winbindd/winbindd_dual.c | 61 ------------------------------- source3/winbindd/winbindd_proto.h | 6 --- 2 files changed, 67 deletions(-) diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index 073749eb7e2..4f314cf59f5 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -367,67 +367,6 @@ int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, return 0; } -struct domain_request_state { - struct winbindd_domain *domain; - struct winbindd_request *request; - struct winbindd_response *response; - void (*continuation)(void *private_data_data, bool success); - void *private_data_data; -}; - -static void async_domain_request_done(struct tevent_req *req); - -void async_domain_request(TALLOC_CTX *mem_ctx, - struct winbindd_domain *domain, - struct winbindd_request *request, - struct winbindd_response *response, - void (*continuation)(void *private_data_data, bool success), - void *private_data_data) -{ - struct tevent_req *subreq; - struct domain_request_state *state; - - state = TALLOC_P(mem_ctx, struct domain_request_state); - if (state == NULL) { - DEBUG(0, ("talloc failed\n")); - continuation(private_data_data, False); - return; - } - - state->domain = domain; - state->request = request; - state->response = response; - state->continuation = continuation; - state->private_data_data = private_data_data; - - subreq = wb_domain_request_send(state, winbind_event_context(), - domain, request); - if (subreq == NULL) { - DEBUG(5, ("wb_domain_request_send failed\n")); - continuation(private_data_data, false); - return; - } - tevent_req_set_callback(subreq, async_domain_request_done, state); -} - -static void async_domain_request_done(struct tevent_req *req) -{ - struct domain_request_state *state = tevent_req_callback_data( - req, struct domain_request_state); - struct winbindd_response *response; - int ret, err; - - ret = wb_domain_request_recv(req, state, &response, &err); - TALLOC_FREE(req); - if (ret == -1) { - DEBUG(5, ("wb_domain_request returned %s\n", strerror(err))); - state->continuation(state->private_data_data, false); - return; - } - *(state->response) = *response; - state->continuation(state->private_data_data, true); -} - static void child_process_request(struct winbindd_child *child, struct winbindd_cli_state *state) { diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h index 981b2f644f2..fa1d5f2c99a 100644 --- a/source3/winbindd/winbindd_proto.h +++ b/source3/winbindd/winbindd_proto.h @@ -270,12 +270,6 @@ struct tevent_req *wb_domain_request_send(TALLOC_CTX *mem_ctx, int wb_domain_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, struct winbindd_response **presponse, int *err); -void async_domain_request(TALLOC_CTX *mem_ctx, - struct winbindd_domain *domain, - struct winbindd_request *request, - struct winbindd_response *response, - void (*continuation)(void *private_data_data, bool success), - void *private_data_data); void setup_child(struct winbindd_domain *domain, struct winbindd_child *child, const struct winbindd_child_dispatch_table *table, const char *logprefix,