From 6f2252dace1629d7b5c5637b103caa28d2c89b07 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 11 Dec 2007 22:23:14 +0100 Subject: r26401: Don't cache interfaces context in libnetif. (This used to be commit 9f975417cc66bfd4589da38bfd23731dbe0e6153) --- source4/utils/nmblookup.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source4/utils/nmblookup.c') diff --git a/source4/utils/nmblookup.c b/source4/utils/nmblookup.c index 1471dfb5b7..6c849fc0db 100644 --- a/source4/utils/nmblookup.c +++ b/source4/utils/nmblookup.c @@ -180,7 +180,8 @@ static NTSTATUS do_node_query(struct nbt_name_socket *nbtsock, } -static bool process_one(struct loadparm_context *lp_ctx, const char *name, int nbt_port) +static bool process_one(struct loadparm_context *lp_ctx, + struct interface *ifaces, const char *name, int nbt_port) { TALLOC_CTX *tmp_ctx = talloc_new(NULL); enum nbt_name_type node_type = NBT_NAME_CLIENT; @@ -242,9 +243,11 @@ static bool process_one(struct loadparm_context *lp_ctx, const char *name, int n status = do_node_query(nbtsock, options.unicast_address, nbt_port, node_name, node_type, false); } else { - int i, num_interfaces = iface_count(lp_ctx); + int i, num_interfaces; + + num_interfaces = iface_count(ifaces); for (i=0;i