diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-10-10 15:46:17 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-10-10 21:50:26 +0200 |
commit | 5a7a1b35be01b7461549a2202ccabd3608b054a1 (patch) | |
tree | f45d232ce0c7004d96ed540f126220c6796e2b04 /libcli/cldap | |
parent | 2cd76b0931582463a6e72df227f3e100dfb00f84 (diff) | |
download | samba-5a7a1b35be01b7461549a2202ccabd3608b054a1.tar.gz |
libcli/cldap: pass tevent_context to cldap_search_send()
metze
Diffstat (limited to 'libcli/cldap')
-rw-r--r-- | libcli/cldap/cldap.c | 11 | ||||
-rw-r--r-- | libcli/cldap/cldap.h | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index c73d37466c0..9253629ba57 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; } diff --git a/libcli/cldap/cldap.h b/libcli/cldap/cldap.h index bf259e9aa5a..10c92959e0d 100644 --- a/libcli/cldap/cldap.h +++ b/libcli/cldap/cldap.h @@ -64,6 +64,7 @@ NTSTATUS cldap_set_incoming_handler(struct cldap_socket *cldap, struct cldap_incoming *), void *private_data); struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, struct cldap_socket *cldap, const struct cldap_search *io); NTSTATUS cldap_search_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, |