summaryrefslogtreecommitdiff
path: root/source4/libnet/libnet_lookup.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-13 16:37:10 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-15 15:39:34 +1000
commit041c699f3ae10d189405b93977e3143813fb4525 (patch)
tree2d6dd07d45ece44142914f0e1c49b879676721e3 /source4/libnet/libnet_lookup.c
parent94fb6120d80d05de0f24ea71a93c761517fd4231 (diff)
downloadsamba-041c699f3ae10d189405b93977e3143813fb4525.tar.gz
samba-041c699f3ae10d189405b93977e3143813fb4525.tar.bz2
samba-041c699f3ae10d189405b93977e3143813fb4525.zip
s4-libnet: converted finddcs call to tevent_req
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/libnet/libnet_lookup.c')
-rw-r--r--source4/libnet/libnet_lookup.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c
index 43a7654d4b..36c747b951 100644
--- a/source4/libnet/libnet_lookup.c
+++ b/source4/libnet/libnet_lookup.c
@@ -186,21 +186,21 @@ NTSTATUS libnet_LookupHost(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
/**
* Sends asynchronous LookupDCs request
*/
-struct composite_context* libnet_LookupDCs_send(struct libnet_context *ctx,
- TALLOC_CTX *mem_ctx,
- struct libnet_LookupDCs *io)
+struct tevent_req *libnet_LookupDCs_send(struct libnet_context *ctx,
+ TALLOC_CTX *mem_ctx,
+ struct libnet_LookupDCs *io)
{
- struct composite_context *c;
+ struct tevent_req *req;
struct messaging_context *msg_ctx =
messaging_client_init(mem_ctx,
- lpcfg_messaging_path(mem_ctx, ctx->lp_ctx),
- ctx->event_ctx);
-
- c = finddcs_send(mem_ctx, lpcfg_netbios_name(ctx->lp_ctx),
- lpcfg_nbt_port(ctx->lp_ctx), io->in.domain_name,
- io->in.name_type, NULL, ctx->resolve_ctx,
- ctx->event_ctx, msg_ctx);
- return c;
+ lpcfg_messaging_path(mem_ctx, ctx->lp_ctx),
+ ctx->event_ctx);
+
+ req = finddcs_send(mem_ctx, lpcfg_netbios_name(ctx->lp_ctx),
+ lpcfg_nbt_port(ctx->lp_ctx), io->in.domain_name,
+ io->in.name_type, NULL, ctx->resolve_ctx,
+ ctx->event_ctx, msg_ctx);
+ return req;
}
/**
@@ -212,12 +212,12 @@ struct composite_context* libnet_LookupDCs_send(struct libnet_context *ctx,
* @return nt status code of execution
*/
-NTSTATUS libnet_LookupDCs_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
+NTSTATUS libnet_LookupDCs_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
struct libnet_LookupDCs *io)
{
NTSTATUS status;
- status = finddcs_recv(c, mem_ctx, &io->out.num_dcs, &io->out.dcs);
- /* "c" already freed here */
+ status = finddcs_recv(req, mem_ctx, &io->out.num_dcs, &io->out.dcs);
+ /* "req" already freed here */
return status;
}
@@ -228,8 +228,8 @@ NTSTATUS libnet_LookupDCs_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
NTSTATUS libnet_LookupDCs(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
struct libnet_LookupDCs *io)
{
- struct composite_context *c = libnet_LookupDCs_send(ctx, mem_ctx, io);
- return libnet_LookupDCs_recv(c, mem_ctx, io);
+ struct tevent_req *req = libnet_LookupDCs_send(ctx, mem_ctx, io);
+ return libnet_LookupDCs_recv(req, mem_ctx, io);
}