summaryrefslogtreecommitdiffstats
path: root/source/param
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-15 02:08:14 +0200
committerMichael Adam <obnox@samba.org>2008-05-15 02:42:40 +0200
commit2986e5174e69527465ae7ef8e108110416752b56 (patch)
treed88a8aa53937b80adb65f8127833291dd5c01579 /source/param
parent83cd9f74d57c462ad5c8956b3ce3c81bea429b67 (diff)
downloadsamba-2986e5174e69527465ae7ef8e108110416752b56.tar.gz
samba-2986e5174e69527465ae7ef8e108110416752b56.tar.xz
samba-2986e5174e69527465ae7ef8e108110416752b56.zip
loadparm: refactor processing of service out of process_registry_globals()
into new function process_registry_service(). Michael
Diffstat (limited to 'source/param')
-rw-r--r--source/param/loadparm.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index ee19a380130..5774b227955 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -6507,6 +6507,26 @@ static struct smbconf_ctx *lp_smbconf_ctx(void)
return conf_ctx;
}
+static bool process_registry_service(struct smbconf_service *service)
+{
+ uint32_t count;
+ bool ret;
+
+ if (service == NULL) {
+ return false;
+ }
+
+ for (count = 0; count < service->num_params; count++) {
+ ret = do_parameter(service->param_names[count],
+ service->param_values[count],
+ NULL);
+ if (ret != true) {
+ return false;
+ }
+ }
+ return true;
+}
+
/*
* process_registry_globals
*/
@@ -6514,7 +6534,6 @@ static bool process_registry_globals(void)
{
WERROR werr;
struct smbconf_service *service = NULL;
- uint32_t count;
TALLOC_CTX *mem_ctx = talloc_stackframe();
struct smbconf_ctx *conf_ctx = lp_smbconf_ctx();
bool ret = false;
@@ -6535,13 +6554,9 @@ static bool process_registry_globals(void)
goto done;
}
- for (count = 0; count < service->num_params; count++) {
- ret = do_parameter(service->param_names[count],
- service->param_values[count],
- NULL);
- if (ret != true) {
- goto done;
- }
+ ret = process_registry_service(service);
+ if (!ret) {
+ goto done;
}
ret = do_parameter("registry shares", "yes", NULL);