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/nbt_server/interfaces.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source4/nbt_server/interfaces.c') diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c index 21ebada3c8..486acfbad5 100644 --- a/source4/nbt_server/interfaces.c +++ b/source4/nbt_server/interfaces.c @@ -216,9 +216,10 @@ static NTSTATUS nbtd_add_wins_socket(struct nbtd_server *nbtsrv) /* setup our listening sockets on the configured network interfaces */ -NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_context *lp_ctx) +NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_context *lp_ctx, + struct interface *ifaces) { - int num_interfaces = iface_count(lp_ctx); + int num_interfaces = iface_count(ifaces); int i; TALLOC_CTX *tmp_ctx = talloc_new(nbtsrv); NTSTATUS status; @@ -232,7 +233,7 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con for non-WINS queries not made on a specific interface */ if (num_interfaces > 0) { - primary_address = iface_n_ip(lp_ctx, 0); + primary_address = iface_n_ip(ifaces, 0); } else { primary_address = inet_ntoa(interpret_addr2( lp_netbios_name(lp_ctx))); @@ -250,15 +251,15 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con } for (i=0; i