summaryrefslogtreecommitdiffstats
path: root/source4/libcli/resolve/nbtlist.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:44 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:05 +0100
commite8f46760e0134c45cd2b6b27aef60622c4bf58fa (patch)
treeb599cd8868f49d98ba574baa4a84b96b3eb2bebf /source4/libcli/resolve/nbtlist.c
parent1167c9d9c6c12d142204cfa3cad94f594f7fba76 (diff)
downloadsamba-e8f46760e0134c45cd2b6b27aef60622c4bf58fa.tar.gz
samba-e8f46760e0134c45cd2b6b27aef60622c4bf58fa.tar.xz
samba-e8f46760e0134c45cd2b6b27aef60622c4bf58fa.zip
r26437: remove another use of global_loadparm.
(This used to be commit 703f17bc0986775bf3fe489eb5c876937dabaa9d)
Diffstat (limited to 'source4/libcli/resolve/nbtlist.c')
-rw-r--r--source4/libcli/resolve/nbtlist.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c
index 21792a665a4..e1452c09d2c 100644
--- a/source4/libcli/resolve/nbtlist.c
+++ b/source4/libcli/resolve/nbtlist.c
@@ -100,6 +100,8 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
struct event_context *event_ctx,
struct nbt_name *name,
const char **address_list,
+ struct interface *ifaces,
+ uint16_t nbt_port,
bool broadcast,
bool wins_lookup)
{
@@ -127,7 +129,7 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
if (composite_nomem(state->name.scope, c)) return c;
}
- load_interfaces(state, lp_interfaces(global_loadparm), &state->ifaces);
+ state->ifaces = talloc_reference(state, ifaces);
/*
* we can't push long names on the wire,
@@ -154,7 +156,7 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
for (i=0;i<state->num_queries;i++) {
state->io_queries[i].in.name = state->name;
state->io_queries[i].in.dest_addr = talloc_strdup(state->io_queries, address_list[i]);
- state->io_queries[i].in.dest_port = lp_nbt_port(global_loadparm);
+ state->io_queries[i].in.dest_port = nbt_port;
if (composite_nomem(state->io_queries[i].in.dest_addr, c)) return c;
state->io_queries[i].in.broadcast = broadcast;
@@ -197,11 +199,14 @@ NTSTATUS resolve_name_nbtlist_recv(struct composite_context *c,
NTSTATUS resolve_name_nbtlist(struct nbt_name *name,
TALLOC_CTX *mem_ctx,
const char **address_list,
+ struct interface *ifaces,
+ uint16_t nbt_port,
bool broadcast, bool wins_lookup,
const char **reply_addr)
{
struct composite_context *c = resolve_name_nbtlist_send(mem_ctx, NULL,
name, address_list,
+ ifaces, nbt_port,
broadcast, wins_lookup);
return resolve_name_nbtlist_recv(c, mem_ctx, reply_addr);
}