lib/param: rename getservicebyname to lpcfg_getservicebyname to avoid conflicts
authorGarming Sam <garming@catalyst.net.nz>
Wed, 19 Feb 2014 05:03:57 +0000 (18:03 +1300)
committerJeremy Allison <jra@samba.org>
Wed, 7 May 2014 17:49:15 +0000 (19:49 +0200)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/param/loadparm.c

index 65378864bbe94e6ea96d37953e2486d3d8ca6181..fc5829379ee8ca4a9d98c11bf65339f03020581f 100644 (file)
@@ -283,7 +283,7 @@ FN_LOCAL_BOOL(autoloaded, autoloaded)
 FN_GLOBAL_CONST_STRING(dnsdomain, dnsdomain)
 
 /* local prototypes */
-static struct loadparm_service *getservicebyname(struct loadparm_context *lp_ctx,
+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 *);
@@ -615,7 +615,7 @@ struct loadparm_service *lpcfg_add_service(struct loadparm_context *lp_ctx,
 
        /* it might already exist */
        if (name) {
-               struct loadparm_service *service = getservicebyname(lp_ctx,
+               struct loadparm_service *service = lpcfg_getservicebyname(lp_ctx,
                                                                    name);
                if (service != NULL) {
                        /* Clean all parametric options for service */
@@ -819,7 +819,7 @@ bool lpcfg_parm_is_cmdline(struct loadparm_context *lp_ctx, const char *name)
  * Find a service by name. Otherwise works like get_service.
  */
 
-static struct loadparm_service *getservicebyname(struct loadparm_context *lp_ctx,
+static struct loadparm_service *lpcfg_getservicebyname(struct loadparm_context *lp_ctx,
                                        const char *pszServiceName)
 {
        int iService;
@@ -1145,7 +1145,9 @@ static bool handle_copy(struct loadparm_context *lp_ctx, int unused,
 
        DEBUG(3, ("Copying service from service %s\n", pszParmValue));
 
-       if ((serviceTemp = getservicebyname(lp_ctx, pszParmValue)) != NULL) {
+       serviceTemp = lpcfg_getservicebyname(lp_ctx, pszParmValue);
+
+       if (serviceTemp != NULL) {
                if (serviceTemp == lp_ctx->currentService) {
                        DEBUG(0, ("Can't copy service %s - unable to copy self!\n", pszParmValue));
                } else {