From 5a7a1b35be01b7461549a2202ccabd3608b054a1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 10 Oct 2011 15:46:17 +0200 Subject: libcli/cldap: pass tevent_context to cldap_search_send() metze --- libcli/cldap/cldap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libcli/cldap/cldap.c') diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index c73d37466c..9253629ba5 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -98,6 +98,7 @@ struct cldap_search_state { struct cldap_search_state *prev, *next; struct { + struct tevent_context *ev; struct cldap_socket *cldap; } caller; @@ -535,8 +536,9 @@ static void cldap_search_state_wakeup_done(struct tevent_req *subreq); queue a cldap reply for send */ struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx, - struct cldap_socket *cldap, - const struct cldap_search *io) + struct tevent_context *ev, + struct cldap_socket *cldap, + const struct cldap_search *io) { struct tevent_req *req, *subreq; struct cldap_search_state *state = NULL; @@ -553,6 +555,7 @@ struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx, return NULL; } ZERO_STRUCTP(state); + state->caller.ev = ev; state->req = req; state->caller.cldap = cldap; state->message_id = -1; @@ -818,7 +821,7 @@ NTSTATUS cldap_search(struct cldap_socket *cldap, return NT_STATUS_PIPE_BUSY; } - req = cldap_search_send(mem_ctx, cldap, io); + req = cldap_search_send(mem_ctx, cldap->event.ctx, cldap, io); NT_STATUS_HAVE_NO_MEMORY(req); if (!tevent_req_poll(req, cldap->event.ctx)) { @@ -931,7 +934,7 @@ struct tevent_req *cldap_netlogon_send(TALLOC_CTX *mem_ctx, state->search.in.timeout = 2; state->search.in.retries = 2; - subreq = cldap_search_send(state, cldap, &state->search); + subreq = cldap_search_send(state, ev, cldap, &state->search); if (tevent_req_nomem(subreq, req)) { goto post; } -- cgit