summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-21 18:43:02 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-21 18:43:02 +0100
commit4590432d6290fd1c21a27ec5e6643d455e4fec69 (patch)
tree9852ce7955b5af67d0b474fdeece16ec579cbdcd /source4/libcli
parente11c61bc5cd487dce06fc38bb0ee8c4e24b04e8c (diff)
downloadsamba-4590432d6290fd1c21a27ec5e6643d455e4fec69.tar.gz
samba-4590432d6290fd1c21a27ec5e6643d455e4fec69.tar.bz2
samba-4590432d6290fd1c21a27ec5e6643d455e4fec69.zip
Remove another global_loadparm instance.
(This used to be commit ccb29c0b463f5ccb53553f0a1c411ad77a84482a)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/wrepl/winsrepl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/libcli/wrepl/winsrepl.c b/source4/libcli/wrepl/winsrepl.c
index 87e5282539..3e7793c0c7 100644
--- a/source4/libcli/wrepl/winsrepl.c
+++ b/source4/libcli/wrepl/winsrepl.c
@@ -311,6 +311,14 @@ static void wrepl_connect_handler(struct composite_context *creq)
composite_done(result);
}
+const char *wrepl_best_ip(struct loadparm_context *lp_ctx, const char *peer_ip)
+{
+ struct interface *ifaces;
+ load_interfaces(lp_ctx, lp_interfaces(lp_ctx), &ifaces);
+ return iface_best_ip(ifaces, peer_ip);
+}
+
+
/*
connect a wrepl_socket to a WINS server
*/
@@ -334,12 +342,6 @@ struct composite_context *wrepl_connect_send(struct wrepl_socket *wrepl_socket,
state->result = result;
state->wrepl_socket = wrepl_socket;
- if (!our_ip) {
- struct interface *ifaces;
- load_interfaces(state, lp_interfaces(global_loadparm), &ifaces);
- our_ip = iface_best_ip(ifaces, peer_ip);
- }
-
us = socket_address_from_strings(state, wrepl_socket->sock->backend_name,
our_ip, 0);
if (composite_nomem(us, result)) return result;