diff options
Diffstat (limited to 'source4/wrepl_server/wrepl_server.c')
-rw-r--r-- | source4/wrepl_server/wrepl_server.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c index dfbc97a6b7..be606b2a0c 100644 --- a/source4/wrepl_server/wrepl_server.c +++ b/source4/wrepl_server/wrepl_server.c @@ -31,10 +31,13 @@ #include "ldb/include/ldb_errors.h" #include "auth/auth.h" #include "db_wrap.h" +#include "param/param.h" static struct ldb_context *wins_config_db_connect(TALLOC_CTX *mem_ctx) { - return ldb_wrap_connect(mem_ctx, private_path(mem_ctx, lp_wins_config_url()), + return ldb_wrap_connect(mem_ctx, global_loadparm, private_path(mem_ctx, + global_loadparm, + lp_wins_config_url(global_loadparm)), system_session(mem_ctx), NULL, 0, NULL); } @@ -81,26 +84,26 @@ static NTSTATUS wreplsrv_open_winsdb(struct wreplsrv_service *service) } /* the default renew interval is 6 days */ - service->config.renew_interval = lp_parm_int(-1,"wreplsrv","renew_interval", 6*24*60*60); + service->config.renew_interval = lp_parm_int(global_loadparm, NULL,"wreplsrv","renew_interval", 6*24*60*60); /* the default tombstone (extinction) interval is 6 days */ - service->config.tombstone_interval= lp_parm_int(-1,"wreplsrv","tombstone_interval", 6*24*60*60); + service->config.tombstone_interval= lp_parm_int(global_loadparm, NULL,"wreplsrv","tombstone_interval", 6*24*60*60); /* the default tombstone (extinction) timeout is 1 day */ - service->config.tombstone_timeout = lp_parm_int(-1,"wreplsrv","tombstone_timeout", 1*24*60*60); + service->config.tombstone_timeout = lp_parm_int(global_loadparm, NULL,"wreplsrv","tombstone_timeout", 1*24*60*60); /* the default tombstone extra timeout is 3 days */ - service->config.tombstone_extra_timeout = lp_parm_int(-1,"wreplsrv","tombstone_extra_timeout", 3*24*60*60); + service->config.tombstone_extra_timeout = lp_parm_int(global_loadparm, NULL,"wreplsrv","tombstone_extra_timeout", 3*24*60*60); /* the default verify interval is 24 days */ - service->config.verify_interval = lp_parm_int(-1,"wreplsrv","verify_interval", 24*24*60*60); + service->config.verify_interval = lp_parm_int(global_loadparm, NULL,"wreplsrv","verify_interval", 24*24*60*60); /* the default scavenging interval is 'renew_interval/2' */ - service->config.scavenging_interval=lp_parm_int(-1,"wreplsrv","scavenging_interval", + service->config.scavenging_interval=lp_parm_int(global_loadparm, NULL,"wreplsrv","scavenging_interval", service->config.renew_interval/2); /* the maximun interval to the next periodic processing event */ - service->config.periodic_interval = lp_parm_int(-1,"wreplsrv","periodic_interval", 15); + service->config.periodic_interval = lp_parm_int(global_loadparm, NULL,"wreplsrv","periodic_interval", 15); return NT_STATUS_OK; } @@ -195,7 +198,7 @@ NTSTATUS wreplsrv_load_partners(struct wreplsrv_service *service) WINSREPL_DEFAULT_PULL_RETRY_INTERVAL); partner->push.change_count = ldb_msg_find_attr_as_uint(res->msgs[i], "pushChangeCount", WINSREPL_DEFAULT_PUSH_CHANGE_COUNT); - partner->push.use_inform = ldb_msg_find_attr_as_uint(res->msgs[i], "pushUseInform", False); + partner->push.use_inform = ldb_msg_find_attr_as_uint(res->msgs[i], "pushUseInform", false); DEBUG(3,("wreplsrv_load_partners: found partner: %s type: 0x%X\n", partner->address, partner->type)); @@ -215,7 +218,7 @@ NTSTATUS wreplsrv_fill_wrepl_table(struct wreplsrv_service *service, TALLOC_CTX *mem_ctx, struct wrepl_table *table_out, const char *initiator, - BOOL full_table) + bool full_table) { struct wreplsrv_owner *cur; uint32_t i = 0; @@ -493,7 +496,7 @@ static void wreplsrv_task_init(struct task_server *task) */ static NTSTATUS wreplsrv_init(struct event_context *event_ctx, const struct model_ops *model_ops) { - if (!lp_wins_support()) { + if (!lp_wins_support(global_loadparm)) { return NT_STATUS_OK; } |