summaryrefslogtreecommitdiff
path: root/source3/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
commit8cb4461044d3020736d985012e4beb9c5db358ad (patch)
treea33d47e1d7de3035f155e3160655958c1adfdd6c /source3/param
parent18b385ccef221af356c1b776aaa0c8c2f3ba4a74 (diff)
downloadsamba-8cb4461044d3020736d985012e4beb9c5db358ad.tar.gz
samba-8cb4461044d3020736d985012e4beb9c5db358ad.tar.bz2
samba-8cb4461044d3020736d985012e4beb9c5db358ad.zip
loadparm: refactor processing of service out of process_registry_globals()
into new function process_registry_service(). Michael (This used to be commit 2986e5174e69527465ae7ef8e108110416752b56)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index ee19a38013..5774b22795 100644
--- a/source3/param/loadparm.c
+++ b/source3/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);