From c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 6 Dec 2007 23:57:22 +0100 Subject: r26325: Remove use of global_loadparm in netif. (This used to be commit e452cb28594f23add7c00247ed39e8323aea78a6) --- source4/nbt_server/interfaces.c | 10 +++++----- source4/nbt_server/nbt_server.c | 2 +- source4/nbt_server/wins/wins_ldb.c | 5 +++-- source4/nbt_server/wins/winsdb.c | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'source4/nbt_server') diff --git a/source4/nbt_server/interfaces.c b/source4/nbt_server/interfaces.c index c40cd6322c..21ebada3c8 100644 --- a/source4/nbt_server/interfaces.c +++ b/source4/nbt_server/interfaces.c @@ -218,7 +218,7 @@ static NTSTATUS nbtd_add_wins_socket(struct nbtd_server *nbtsrv) */ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_context *lp_ctx) { - int num_interfaces = iface_count(); + int num_interfaces = iface_count(lp_ctx); int i; TALLOC_CTX *tmp_ctx = talloc_new(nbtsrv); NTSTATUS status; @@ -232,7 +232,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(0); + primary_address = iface_n_ip(lp_ctx, 0); } else { primary_address = inet_ntoa(interpret_addr2( lp_netbios_name(lp_ctx))); @@ -250,15 +250,15 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con } for (i=0; ilp_ctx) == 0) { task_server_terminate(task, "nbtd: no network interfaces configured"); return; } diff --git a/source4/nbt_server/wins/wins_ldb.c b/source4/nbt_server/wins/wins_ldb.c index 3d22b5fe1b..7caab34aaa 100644 --- a/source4/nbt_server/wins/wins_ldb.c +++ b/source4/nbt_server/wins/wins_ldb.c @@ -84,12 +84,13 @@ static int wins_ldb_init(struct ldb_module *ctx) { struct winsdb_handle *h; const char *owner; + struct loadparm_context *lp_ctx = ldb_get_opaque(ctx->ldb, "loadparm"); ctx->private_data = NULL; - owner = lp_parm_string(global_loadparm, NULL, "winsdb", "local_owner"); + owner = lp_parm_string(lp_ctx, NULL, "winsdb", "local_owner"); if (!owner) { - owner = iface_n_ip(0); + owner = iface_n_ip(lp_ctx, 0); if (!owner) { owner = "0.0.0.0"; } diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c index 438fb12b58..428b154731 100644 --- a/source4/nbt_server/wins/winsdb.c +++ b/source4/nbt_server/wins/winsdb.c @@ -1035,7 +1035,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, struct loadparm_contex owner = lp_parm_string(lp_ctx, NULL, "winsdb", "local_owner"); if (!owner) { - owner = iface_n_ip(0); + owner = iface_n_ip(lp_ctx, 0); } h->local_owner = talloc_strdup(h, owner); -- cgit