param: use lpcfg_service_ok in s3 loadparm
authorGarming Sam <garming@catalyst.net.nz>
Thu, 20 Mar 2014 20:33:01 +0000 (09:33 +1300)
committerMichael Adam <obnox@samba.org>
Thu, 31 Jul 2014 06:17:11 +0000 (08:17 +0200)
Change-Id: Ic157d3f5ec7ac9a72db86239e76cd743149cb8e0
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/param/loadparm.c
source3/param/loadparm.c

index 2d9bee2ab6d97824232a2afe64e064fed78e0b6c..12bb120901face76670ba01963cd7c5dba32e18a 100644 (file)
@@ -229,7 +229,6 @@ FN_GLOBAL_CONST_STRING(dnsdomain, dnsdomain)
 /* local prototypes */
 static struct loadparm_service *lpcfg_getservicebyname(struct loadparm_context *lp_ctx,
                                        const char *pszServiceName);
-static bool lpcfg_service_ok(struct loadparm_service *service);
 static bool do_section(const char *pszSectionName, void *);
 static bool set_variable_helper(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
                                const char *pszParmName, const char *pszParmValue);
@@ -932,7 +931,7 @@ void copy_service(struct loadparm_service *pserviceDest,
  * Check a service for consistency. Return False if the service is in any way
  * incomplete or faulty, else True.
  */
-static bool lpcfg_service_ok(struct loadparm_service *service)
+bool lpcfg_service_ok(struct loadparm_service *service)
 {
        bool bRetval;
 
index cbf372deece6180a60729846811452a077486b0b..48808779f2faa7d4a7c8b6476839101ba53dffdf 100644 (file)
@@ -2102,7 +2102,7 @@ static bool process_smbconf_service(struct smbconf_service *service)
                }
        }
        if (iServiceIndex >= 0) {
-               return service_ok(iServiceIndex);
+               return lpcfg_service_ok(ServicePtrs[iServiceIndex]);
        }
        return true;
 }
@@ -2754,7 +2754,7 @@ bool lp_do_section(const char *pszSectionName, void *userdata)
        bRetval = true;
 
        if (iServiceIndex >= 0)
-               bRetval = service_ok(iServiceIndex);
+               bRetval = lpcfg_service_ok(ServicePtrs[iServiceIndex]);
 
        /* if all is still well, move to the next record in the services array */
        if (bRetval) {
@@ -3935,7 +3935,7 @@ static bool lp_load_ex(const char *pszFname,
                DEBUG(4, ("pm_process() returned %s\n", BOOLSTR(bRetval)));
                if (bRetval) {
                        if (iServiceIndex >= 0) {
-                               bRetval = service_ok(iServiceIndex);
+                               bRetval = lpcfg_service_ok(ServicePtrs[iServiceIndex]);
                        }
                }