From 60a1046c5c5783799bd64fe18e03534670f83d82 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 29 Sep 2007 18:00:19 +0000 Subject: r25430: Add the loadparm context to all parametric options. (This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58) --- source4/nbt_server/wins/wins_ldb.c | 2 +- source4/nbt_server/wins/winsclient.c | 4 ++-- source4/nbt_server/wins/winsdb.c | 6 +++--- source4/nbt_server/wins/winsserver.c | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source4/nbt_server/wins') diff --git a/source4/nbt_server/wins/wins_ldb.c b/source4/nbt_server/wins/wins_ldb.c index 2e5889fb1e..3d22b5fe1b 100644 --- a/source4/nbt_server/wins/wins_ldb.c +++ b/source4/nbt_server/wins/wins_ldb.c @@ -87,7 +87,7 @@ static int wins_ldb_init(struct ldb_module *ctx) ctx->private_data = NULL; - owner = lp_parm_string(NULL, "winsdb", "local_owner"); + owner = lp_parm_string(global_loadparm, NULL, "winsdb", "local_owner"); if (!owner) { owner = iface_n_ip(0); if (!owner) { diff --git a/source4/nbt_server/wins/winsclient.c b/source4/nbt_server/wins/winsclient.c index 1dd934cc92..d1342c3766 100644 --- a/source4/nbt_server/wins/winsclient.c +++ b/source4/nbt_server/wins/winsclient.c @@ -58,7 +58,7 @@ static void nbtd_wins_register_retry(struct event_context *ev, struct timed_even static void nbtd_wins_start_refresh_timer(struct nbtd_iface_name *iname) { uint32_t refresh_time; - uint32_t max_refresh_time = lp_parm_int(NULL, "nbtd", "max_refresh_time", 7200); + uint32_t max_refresh_time = lp_parm_int(global_loadparm, NULL, "nbtd", "max_refresh_time", 7200); refresh_time = MIN(max_refresh_time, iname->ttl/2); @@ -179,7 +179,7 @@ static void nbtd_wins_register_handler(struct composite_context *c) if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { /* none of the WINS servers responded - try again periodically */ - int wins_retry_time = lp_parm_int(NULL, "nbtd", "wins_retry", 300); + int wins_retry_time = lp_parm_int(global_loadparm, NULL, "nbtd", "wins_retry", 300); event_add_timed(iname->iface->nbtsrv->task->event_ctx, iname, timeval_current_ofs(wins_retry_time, 0), diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c index f7d149126b..299d5be894 100644 --- a/source4/nbt_server/wins/winsdb.c +++ b/source4/nbt_server/wins/winsdb.c @@ -988,7 +988,7 @@ static BOOL winsdb_check_or_add_module_list(struct winsdb_handle *h) talloc_free(h->ldb); h->ldb = NULL; - if (lp_parm_bool(NULL,"winsdb", "nosync", false)) { + if (lp_parm_bool(global_loadparm, NULL,"winsdb", "nosync", false)) { flags |= LDB_FLG_NOSYNC; } @@ -1021,7 +1021,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, enum winsdb_handle_cal h = talloc(mem_ctx, struct winsdb_handle); if (!h) return NULL; - if (lp_parm_bool(NULL,"winsdb", "nosync", false)) { + if (lp_parm_bool(global_loadparm, NULL,"winsdb", "nosync", false)) { flags |= LDB_FLG_NOSYNC; } @@ -1031,7 +1031,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, enum winsdb_handle_cal h->caller = caller; - owner = lp_parm_string(NULL, "winsdb", "local_owner"); + owner = lp_parm_string(global_loadparm, NULL, "winsdb", "local_owner"); if (!owner) { owner = iface_n_ip(0); } diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c index 698d432c75..eb45bf5fc2 100644 --- a/source4/nbt_server/wins/winsserver.c +++ b/source4/nbt_server/wins/winsserver.c @@ -615,7 +615,7 @@ static void nbtd_wins_randomize1Clist(const char **addresses, struct socket_addr ldb_qsort(addresses, num_addrs , sizeof(addresses[0]), src, (ldb_qsort_cmp_fn_t)nbtd_wins_randomize1Clist_sort); - mask = lp_parm_string(NULL, "nbtd", "wins_randomize1Clist_mask"); + mask = lp_parm_string(global_loadparm, NULL, "nbtd", "wins_randomize1Clist_mask"); if (!mask) { mask = "255.255.255.0"; } @@ -692,7 +692,7 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock, * Value: 0 = deactivated, 1 = activated */ if (name->type == NBT_NAME_LOGON && - lp_parm_bool(NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) { + lp_parm_bool(global_loadparm, NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) { struct nbt_name name_1b; name_1b = *name; @@ -788,7 +788,7 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock, * Value: 0 = deactivated, 1 = activated */ if (name->type == NBT_NAME_LOGON && - lp_parm_bool(NULL, "nbtd", "wins_randomize1Clist", false)) { + lp_parm_bool(global_loadparm, NULL, "nbtd", "wins_randomize1Clist", false)) { nbtd_wins_randomize1Clist(addresses, src); } @@ -967,9 +967,9 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv) nbtsrv->winssrv->config.max_renew_interval = lp_max_wins_ttl(global_loadparm); nbtsrv->winssrv->config.min_renew_interval = lp_min_wins_ttl(global_loadparm); - tmp = lp_parm_int(NULL, "wreplsrv", "tombstone_interval", 6*24*60*60); + tmp = lp_parm_int(global_loadparm, NULL, "wreplsrv", "tombstone_interval", 6*24*60*60); nbtsrv->winssrv->config.tombstone_interval = tmp; - tmp = lp_parm_int(NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60); + tmp = lp_parm_int(global_loadparm, NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60); nbtsrv->winssrv->config.tombstone_timeout = tmp; nbtsrv->winssrv->wins_db = winsdb_connect(nbtsrv->winssrv, WINSDB_HANDLE_CALLER_NBTD); -- cgit