summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-06 23:57:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:37 +0100
commitc5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124 (patch)
treea8f2d25736e2edb08fc4b03b21f3a2949b1e2117 /source4/libcli
parent04304808cabd0f05a5ff5bf23d8fd950eff8d6f3 (diff)
downloadsamba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.tar.gz
samba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.tar.bz2
samba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.zip
r26325: Remove use of global_loadparm in netif.
(This used to be commit e452cb28594f23add7c00247ed39e8323aea78a6)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/resolve/bcast.c7
-rw-r--r--source4/libcli/resolve/nbtlist.c2
-rw-r--r--source4/libcli/wrepl/winsrepl.c3
3 files changed, 7 insertions, 5 deletions
diff --git a/source4/libcli/resolve/bcast.c b/source4/libcli/resolve/bcast.c
index 3193d70789..ad574e4c9e 100644
--- a/source4/libcli/resolve/bcast.c
+++ b/source4/libcli/resolve/bcast.c
@@ -23,15 +23,16 @@
#include "libcli/resolve/resolve.h"
#include "system/network.h"
#include "lib/socket/netif.h"
+#include "param/param.h"
-/*
+/**
broadcast name resolution method - async send
*/
struct composite_context *resolve_name_bcast_send(TALLOC_CTX *mem_ctx,
struct event_context *event_ctx,
struct nbt_name *name)
{
- int num_interfaces = iface_count();
+ int num_interfaces = iface_count(global_loadparm);
const char **address_list;
struct composite_context *c;
int i, count=0;
@@ -40,7 +41,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(i);
+ const char *bcast = iface_n_bcast(global_loadparm, i);
if (bcast == NULL) continue;
address_list[count] = talloc_strdup(address_list, bcast);
if (address_list[count] == NULL) {
diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c
index 13010eec3e..daa602f97c 100644
--- a/source4/libcli/resolve/nbtlist.c
+++ b/source4/libcli/resolve/nbtlist.c
@@ -77,7 +77,7 @@ static void nbtlist_handler(struct nbt_name_request *req)
/* favor a local address if possible */
state->reply_addr = NULL;
for (i=0;i<q->out.num_addrs;i++) {
- if (iface_is_local(q->out.reply_addrs[i])) {
+ if (iface_is_local(global_loadparm, q->out.reply_addrs[i])) {
state->reply_addr = talloc_steal(state,
q->out.reply_addrs[i]);
break;
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c
index 1f7ca796b6..8f808198eb 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -29,6 +29,7 @@
#include "libcli/composite/composite.h"
#include "system/network.h"
#include "lib/socket/netif.h"
+#include "param/param.h"
static struct wrepl_request *wrepl_request_finished(struct wrepl_request *req, NTSTATUS status);
@@ -330,7 +331,7 @@ struct composite_context *wrepl_connect_send(struct wrepl_socket *wrepl_socket,
state->wrepl_socket = wrepl_socket;
if (!our_ip) {
- our_ip = iface_best_ip(peer_ip);
+ our_ip = iface_best_ip(global_loadparm, peer_ip);
}
us = socket_address_from_strings(state, wrepl_socket->sock->backend_name,