summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-29 18:00:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:31 -0500
commit60a1046c5c5783799bd64fe18e03534670f83d82 (patch)
tree48f788a6a6fbed5af0a3f3eea1e4373d70b03e5b /source4/nbt_server
parent98038f71a7b072912c974d131012335ca22c5259 (diff)
downloadsamba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.gz
samba-60a1046c5c5783799bd64fe18e03534670f83d82.tar.bz2
samba-60a1046c5c5783799bd64fe18e03534670f83d82.zip
r25430: Add the loadparm context to all parametric options.
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/register.c4
-rw-r--r--source4/nbt_server/wins/wins_ldb.c2
-rw-r--r--source4/nbt_server/wins/winsclient.c4
-rw-r--r--source4/nbt_server/wins/winsdb.c6
-rw-r--r--source4/nbt_server/wins/winsserver.c10
5 files changed, 13 insertions, 13 deletions
diff --git a/source4/nbt_server/register.c b/source4/nbt_server/register.c
index cb831f3443..0ef77af4c5 100644
--- a/source4/nbt_server/register.c
+++ b/source4/nbt_server/register.c
@@ -117,7 +117,7 @@ static void name_refresh_handler(struct event_context *ev, struct timed_event *t
static void nbtd_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);
@@ -187,7 +187,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
iname->name.scope = NULL;
}
iname->nb_flags = nb_flags;
- iname->ttl = lp_parm_int(NULL, "nbtd", "bcast_ttl", 300000);
+ iname->ttl = lp_parm_int(global_loadparm, NULL, "nbtd", "bcast_ttl", 300000);
iname->registration_time = timeval_zero();
iname->wins_server = NULL;
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);