From 116fbd6b5a82a2e9f2440aae4ad56cf8a457c85b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 17 Dec 2008 17:25:40 +0100 Subject: s4:libcli/resolve: specify the port for the resulting socket_addresses metze --- source4/libcli/resolve/nbtlist.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/libcli/resolve/nbtlist.c') diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c index 8d6a5a7a7e..2c128e2560 100644 --- a/source4/libcli/resolve/nbtlist.c +++ b/source4/libcli/resolve/nbtlist.c @@ -35,6 +35,7 @@ struct nbtlist_state { uint16_t flags; + uint16_t port; struct nbt_name name; struct nbt_name_socket *nbtsock; int num_queries; @@ -90,7 +91,7 @@ static void nbtlist_handler(struct nbt_name_request *req) state->addrs[i] = socket_address_from_strings(state->addrs, "ipv4", q->out.reply_addrs[i], - 0); + state->port); if (composite_nomem(state->addrs[i], c)) return; state->names[i] = talloc_strdup(state->names, state->name.name); @@ -108,6 +109,7 @@ static void nbtlist_handler(struct nbt_name_request *req) struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, uint32_t flags, + uint16_t port, struct nbt_name *name, const char **address_list, struct interface *ifaces, @@ -130,6 +132,7 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx, c->private_data = state; state->flags = flags; + state->port = port; c->status = nbt_name_dup(state, name, &state->name); if (!composite_is_ok(c)) return c; -- cgit