summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-27 23:24:39 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-27 17:11:16 +0200
commit666dba33531c7e7d391318c915fb393ec5b1da36 (patch)
treecf5b864e6607487b4487ee5df7de2484e8d59b3b /source3/lib
parent7e8ed7d68dc48dd283df649c3f75d5679f7beae9 (diff)
downloadsamba-666dba33531c7e7d391318c915fb393ec5b1da36.tar.gz
samba-666dba33531c7e7d391318c915fb393ec5b1da36.tar.bz2
samba-666dba33531c7e7d391318c915fb393ec5b1da36.zip
s3-param: Rename loadparm_s3_context -> loadparm_s3_helpers
This helps clarify the role of this structure and wrapper function. The purpose here is to provide helper functions to the lib/param loadparm_context that point back at the s3 lp_ functions. This allows a struct loadparm_context to be passed to any point in the code, and always refer to the correct loadparm system. If this has not been set, the variables loaded in the lib/param code will be returned. As requested by Michael Adam. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c2
-rw-r--r--source3/lib/dbwrap/dbwrap_open.c2
-rw-r--r--source3/lib/messages_local.c4
-rw-r--r--source3/lib/server_mutex.c2
-rw-r--r--source3/lib/serverid.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 7bb206bea5..1062cb0bbd 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1583,7 +1583,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
return NULL;
}
- lp_ctx = loadparm_init_s3(db_path, loadparm_s3_context());
+ lp_ctx = loadparm_init_s3(db_path, loadparm_s3_helpers());
db_ctdb->wtdb = tdb_wrap_open(db_ctdb, db_path, hash_size, tdb_flags,
O_RDWR, 0, lp_ctx);
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
index e5adab7eaa..515b4bff1d 100644
--- a/source3/lib/dbwrap/dbwrap_open.c
+++ b/source3/lib/dbwrap/dbwrap_open.c
@@ -118,7 +118,7 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
#endif
if (result == NULL) {
- struct loadparm_context *lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_context());
+ struct loadparm_context *lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_helpers());
result = dbwrap_local_open(mem_ctx, lp_ctx, name, hash_size,
tdb_flags, open_flags, mode,
lock_order);
diff --git a/source3/lib/messages_local.c b/source3/lib/messages_local.c
index 74b6a13764..6b63d72925 100644
--- a/source3/lib/messages_local.c
+++ b/source3/lib/messages_local.c
@@ -104,7 +104,7 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
return NT_STATUS_NO_MEMORY;
}
- lp_ctx = loadparm_init_s3(result, loadparm_s3_context());
+ lp_ctx = loadparm_init_s3(result, loadparm_s3_helpers());
if (lp_ctx == NULL) {
DEBUG(0, ("loadparm_init_s3 failed\n"));
return NT_STATUS_INTERNAL_ERROR;
@@ -158,7 +158,7 @@ bool messaging_tdb_parent_init(TALLOC_CTX *mem_ctx)
struct tdb_wrap *db;
struct loadparm_context *lp_ctx;
- lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_context());
+ lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_helpers());
if (lp_ctx == NULL) {
DEBUG(0, ("loadparm_init_s3 failed\n"));
return false;
diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c
index 9430141d1c..619fbd077f 100644
--- a/source3/lib/server_mutex.c
+++ b/source3/lib/server_mutex.c
@@ -54,7 +54,7 @@ struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
return NULL;
}
- lp_ctx = loadparm_init_s3(result, loadparm_s3_context());
+ lp_ctx = loadparm_init_s3(result, loadparm_s3_helpers());
if (lp_ctx == NULL) {
DEBUG(0, ("loadparm_init_s3 failed\n"));
talloc_free(result);
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index 4e31756620..3068d77a84 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -44,7 +44,7 @@ bool serverid_parent_init(TALLOC_CTX *mem_ctx)
struct tdb_wrap *db;
struct loadparm_context *lp_ctx;
- lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_context());
+ lp_ctx = loadparm_init_s3(mem_ctx, loadparm_s3_helpers());
if (lp_ctx == NULL) {
DEBUG(0, ("loadparm_init_s3 failed\n"));
return false;