Move libnet_conf_set_global_parameter() inside libnet_conf.c
authorMichael Adam <obnox@samba.org>
Sun, 13 Jan 2008 22:00:16 +0000 (23:00 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 13 Jan 2008 22:16:41 +0000 (23:16 +0100)
Also remove the "convenience function" section comment.
The set_global_parameter function now has a right to exist
in the api.

Michael

source/libnet/libnet_conf.c

index 005a35fd0c6fc39bdafa18e87e263f63c4dc4990..858c4a06b4115266e87e491ebd2ada4ac1af6699 100644 (file)
@@ -793,6 +793,29 @@ done:
        return werr;
 }
 
+/**
+ * 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
  */
@@ -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;
-}
-