From d78bb0cd195611e88312deb2f7b7f8e8680f2717 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 22 Jul 2011 10:10:43 +0200 Subject: [PATCH] s3:loadparm: add reload_registry_shares() - reload only those shares already loaded (cherry picked from commit ec113a58a4dc4e4f3ea03f7818eb312325f69482) (cherry picked from commit cc3c8d10940ef5d5d0e636b0f9d46606d46b0dc7) --- source3/param/loadparm.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0a1a4b063f7..ed01c9b29f3 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -7351,6 +7351,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; -- 2.11.4.GIT