summaryrefslogtreecommitdiff
path: root/source4/libcli/resolve
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-10 18:41:33 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:12 +0100
commiteede6b87e1dac018035bb68a675f80d6b25c20e3 (patch)
treea3fc73ac715caccaf63cc95991e41bc11a735935 /source4/libcli/resolve
parent51ef1b606fe1853b7ca2decf2a74eecf18c5a747 (diff)
downloadsamba-eede6b87e1dac018035bb68a675f80d6b25c20e3.tar.gz
samba-eede6b87e1dac018035bb68a675f80d6b25c20e3.tar.bz2
samba-eede6b87e1dac018035bb68a675f80d6b25c20e3.zip
r26378: Remove use of global_loadparm.
(This used to be commit 81333de5353ce70512a3ed1d4960c09aa78954c6)
Diffstat (limited to 'source4/libcli/resolve')
-rw-r--r--source4/libcli/resolve/bcast.c9
-rw-r--r--source4/libcli/resolve/resolve.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/source4/libcli/resolve/bcast.c b/source4/libcli/resolve/bcast.c
index 5a2c49c5ad..1733ca9d2e 100644
--- a/source4/libcli/resolve/bcast.c
+++ b/source4/libcli/resolve/bcast.c
@@ -33,7 +33,8 @@ struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx,
void *userdata,
struct nbt_name *name)
{
- int num_interfaces = iface_count(global_loadparm);
+ struct loadparm_context *lp_ctx = userdata;
+ int num_interfaces = iface_count(lp_ctx);
const char **address_list;
struct composite_context *c;
int i, count=0;
@@ -42,7 +43,7 @@ struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx,
if (address_list == NULL) return NULL;
for (i=0;i<num_interfaces;i++) {
- const char *bcast = iface_n_bcast(global_loadparm, i);
+ const char *bcast = iface_n_bcast(lp_ctx, i);
if (bcast == NULL) continue;
address_list[count] = talloc_strdup(address_list, bcast);
if (address_list[count] == NULL) {
@@ -79,8 +80,8 @@ NTSTATUS resolve_name_bcast(struct nbt_name *name,
return resolve_name_bcast_recv(c, mem_ctx, reply_addr);
}
-bool resolve_context_add_bcast_method(struct resolve_context *ctx)
+bool resolve_context_add_bcast_method(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
{
return resolve_context_add_method(ctx, resolve_name_bcast_send, resolve_name_bcast_recv,
- NULL);
+ lp_ctx);
}
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index f0d9c07874..ad2d58a64c 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -241,7 +241,7 @@ struct resolve_context *lp_resolve_context(struct loadparm_context *lp_ctx)
if (!strcmp(methods[i], "wins")) {
resolve_context_add_wins_method(ret, lp_wins_server_list(lp_ctx));
} else if (!strcmp(methods[i], "bcast")) {
- resolve_context_add_bcast_method(ret);
+ resolve_context_add_bcast_method(ret, lp_ctx);
} else if (!strcmp(methods[i], "host")) {
resolve_context_add_host_method(ret);
} else {