From ec113a58a4dc4e4f3ea03f7818eb312325f69482 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 22 Jul 2011 10:10:43 +0200 Subject: s3:loadparm: add reload_registry_shares() - reload only those shares already loaded --- source3/param/loadparm.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'source3/param/loadparm.c') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 16eb719f92..b23c8ddb88 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -6743,6 +6743,35 @@ done: return ret; } +/** + * reload those shares from registry that are already + * activated in the services array. + */ +static bool reload_registry_shares(void) +{ + int i; + bool ret = true; + + for (i = 0; i < iNumServices; i++) { + if (!VALID(i)) { + continue; + } + + if (ServicePtrs[i]->usershare == USERSHARE_VALID) { + continue; + } + + ret = process_registry_service(ServicePtrs[i]->szService); + if (!ret) { + goto done; + } + } + +done: + return ret; +} + + #define MAX_INCLUDE_DEPTH 100 static uint8_t include_depth; -- cgit