summaryrefslogtreecommitdiffstats
path: root/source3/libnet
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-01-13 23:00:16 +0100
committerMichael Adam <obnox@samba.org>2008-01-13 23:16:41 +0100
commitd042a6409225f17b9d8665477fffb08c311512d9 (patch)
treeef3c292065895f6825cecc2a433638653ad1ca7a /source3/libnet
parentecc53ab37147affbc0ee6fdae5a980dabe73b4f4 (diff)
downloadsamba-d042a6409225f17b9d8665477fffb08c311512d9.tar.gz
samba-d042a6409225f17b9d8665477fffb08c311512d9.tar.xz
samba-d042a6409225f17b9d8665477fffb08c311512d9.zip
Move libnet_conf_set_global_parameter() inside libnet_conf.c
Also remove the "convenience function" section comment. The set_global_parameter function now has a right to exist in the api. Michael (This used to be commit fd99c1804ae04b7c2a2b0a605e83ba88fa362edb)
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_conf.c53
1 files changed, 23 insertions, 30 deletions
diff --git a/source3/libnet/libnet_conf.c b/source3/libnet/libnet_conf.c
index 005a35fd0c6..858c4a06b41 100644
--- a/source3/libnet/libnet_conf.c
+++ b/source3/libnet/libnet_conf.c
@@ -794,6 +794,29 @@ done:
}
/**
+ * Set a global parameter
+ * (i.e. a parameter in the [global] service).
+ *
+ * This also creates [global] when it does not exist.
+ */
+WERROR libnet_conf_set_global_parameter(struct libnet_conf_ctx *ctx,
+ const char *param, const char *val)
+{
+ WERROR werr;
+
+ if (!libnet_conf_share_exists(ctx, GLOBAL_NAME)) {
+ werr = libnet_conf_create_share(ctx, GLOBAL_NAME);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
+ }
+ werr = libnet_conf_set_parameter(ctx, GLOBAL_NAME, param, val);
+
+done:
+ return werr;
+}
+
+/**
* get the value of a configuration parameter as a string
*/
WERROR libnet_conf_get_parameter(TALLOC_CTX *mem_ctx,
@@ -877,33 +900,3 @@ done:
return werr;
}
-
-/**********************************************************************
- *
- * Convenience functions that are also exported.
- *
- **********************************************************************/
-
-/**
- * Set a global parameter
- * (i.e. a parameter in the [global] service).
- *
- * This also creates [global] when it does not exist.
- */
-WERROR libnet_conf_set_global_parameter(struct libnet_conf_ctx *ctx,
- const char *param, const char *val)
-{
- WERROR werr;
-
- if (!libnet_conf_share_exists(ctx, GLOBAL_NAME)) {
- werr = libnet_conf_create_share(ctx, GLOBAL_NAME);
- if (!W_ERROR_IS_OK(werr)) {
- goto done;
- }
- }
- werr = libnet_conf_set_parameter(ctx, GLOBAL_NAME, param, val);
-
-done:
- return werr;
-}
-