mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
libcli/cldap: pass tevent_context to cldap_netlogon_send()
metze
This commit is contained in:
parent
3ed85d7c69
commit
2cd76b0931
@ -841,8 +841,9 @@ static void cldap_netlogon_state_done(struct tevent_req *subreq);
|
|||||||
queue a cldap netlogon for send
|
queue a cldap netlogon for send
|
||||||
*/
|
*/
|
||||||
struct tevent_req *cldap_netlogon_send(TALLOC_CTX *mem_ctx,
|
struct tevent_req *cldap_netlogon_send(TALLOC_CTX *mem_ctx,
|
||||||
struct cldap_socket *cldap,
|
struct tevent_context *ev,
|
||||||
const struct cldap_netlogon *io)
|
struct cldap_socket *cldap,
|
||||||
|
const struct cldap_netlogon *io)
|
||||||
{
|
{
|
||||||
struct tevent_req *req, *subreq;
|
struct tevent_req *req, *subreq;
|
||||||
struct cldap_netlogon_state *state;
|
struct cldap_netlogon_state *state;
|
||||||
@ -1023,7 +1024,7 @@ NTSTATUS cldap_netlogon(struct cldap_socket *cldap,
|
|||||||
return NT_STATUS_PIPE_BUSY;
|
return NT_STATUS_PIPE_BUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
req = cldap_netlogon_send(mem_ctx, cldap, io);
|
req = cldap_netlogon_send(mem_ctx, cldap->event.ctx, cldap, io);
|
||||||
NT_STATUS_HAVE_NO_MEMORY(req);
|
NT_STATUS_HAVE_NO_MEMORY(req);
|
||||||
|
|
||||||
if (!tevent_req_poll(req, cldap->event.ctx)) {
|
if (!tevent_req_poll(req, cldap->event.ctx)) {
|
||||||
|
@ -114,6 +114,7 @@ struct cldap_netlogon {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct tevent_req *cldap_netlogon_send(TALLOC_CTX *mem_ctx,
|
struct tevent_req *cldap_netlogon_send(TALLOC_CTX *mem_ctx,
|
||||||
|
struct tevent_context *ev,
|
||||||
struct cldap_socket *cldap,
|
struct cldap_socket *cldap,
|
||||||
const struct cldap_netlogon *io);
|
const struct cldap_netlogon *io);
|
||||||
NTSTATUS cldap_netlogon_recv(struct tevent_req *req,
|
NTSTATUS cldap_netlogon_recv(struct tevent_req *req,
|
||||||
|
@ -249,7 +249,7 @@ static void nmbd_proxy_logon(struct nmbd_proxy_logon_context *ctx,
|
|||||||
state->io.in.version = nt_version;
|
state->io.in.version = nt_version;
|
||||||
state->io.in.map_response = false;
|
state->io.in.map_response = false;
|
||||||
|
|
||||||
subreq = cldap_netlogon_send(state,
|
subreq = cldap_netlogon_send(state, nmbd_event_context(),
|
||||||
ctx->cldap_sock,
|
ctx->cldap_sock,
|
||||||
&state->io);
|
&state->io);
|
||||||
if (!subreq) {
|
if (!subreq) {
|
||||||
|
@ -234,7 +234,8 @@ static void finddcs_cldap_next_server(struct finddcs_cldap_state *state)
|
|||||||
|
|
||||||
DEBUG(4,("finddcs: performing CLDAP query on %s\n", state->netlogon->in.dest_address));
|
DEBUG(4,("finddcs: performing CLDAP query on %s\n", state->netlogon->in.dest_address));
|
||||||
|
|
||||||
subreq = cldap_netlogon_send(state, state->cldap, state->netlogon);
|
subreq = cldap_netlogon_send(state, state->ev,
|
||||||
|
state->cldap, state->netlogon);
|
||||||
if (tevent_req_nomem(subreq, state->req)) {
|
if (tevent_req_nomem(subreq, state->req)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -777,7 +777,8 @@ static void becomeDC_send_cldap(struct libnet_BecomeDC_state *s)
|
|||||||
NULL, dest_address, &s->cldap.sock);
|
NULL, dest_address, &s->cldap.sock);
|
||||||
if (!composite_is_ok(c)) return;
|
if (!composite_is_ok(c)) return;
|
||||||
|
|
||||||
req = cldap_netlogon_send(s, s->cldap.sock, &s->cldap.io);
|
req = cldap_netlogon_send(s, s->libnet->event_ctx,
|
||||||
|
s->cldap.sock, &s->cldap.io);
|
||||||
if (composite_nomem(req, c)) return;
|
if (composite_nomem(req, c)) return;
|
||||||
tevent_req_set_callback(req, becomeDC_recv_cldap, s);
|
tevent_req_set_callback(req, becomeDC_recv_cldap, s);
|
||||||
}
|
}
|
||||||
|
@ -285,7 +285,8 @@ static void unbecomeDC_send_cldap(struct libnet_UnbecomeDC_state *s)
|
|||||||
NULL, dest_address, &s->cldap.sock);
|
NULL, dest_address, &s->cldap.sock);
|
||||||
if (!composite_is_ok(c)) return;
|
if (!composite_is_ok(c)) return;
|
||||||
|
|
||||||
req = cldap_netlogon_send(s, s->cldap.sock, &s->cldap.io);
|
req = cldap_netlogon_send(s, s->libnet->event_ctx,
|
||||||
|
s->cldap.sock, &s->cldap.io);
|
||||||
if (composite_nomem(req, c)) return;
|
if (composite_nomem(req, c)) return;
|
||||||
tevent_req_set_callback(req, unbecomeDC_recv_cldap, s);
|
tevent_req_set_callback(req, unbecomeDC_recv_cldap, s);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,8 @@ static bool bench_cldap_netlogon(struct torture_context *tctx, const char *addre
|
|||||||
while (timeval_elapsed(&tv) < timelimit) {
|
while (timeval_elapsed(&tv) < timelimit) {
|
||||||
while (num_sent - (state->pass_count+state->fail_count) < 10) {
|
while (num_sent - (state->pass_count+state->fail_count) < 10) {
|
||||||
struct tevent_req *req;
|
struct tevent_req *req;
|
||||||
req = cldap_netlogon_send(state, cldap, &search);
|
req = cldap_netlogon_send(state, tctx->ev,
|
||||||
|
cldap, &search);
|
||||||
|
|
||||||
tevent_req_set_callback(req, request_netlogon_handler, state);
|
tevent_req_set_callback(req, request_netlogon_handler, state);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user