lib/param: remove unnecessary get_parametric s3 helper function
authorGarming Sam <garming@catalyst.net.nz>
Tue, 25 Feb 2014 04:07:31 +0000 (17:07 +1300)
committerJeremy Allison <jra@samba.org>
Wed, 7 May 2014 17:49:17 +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
lib/param/s3_param.h
source3/param/loadparm.c
source3/param/loadparm_ctx.c

index fd0c827d1a257437f7bd210805263bff773b176c..7fcda4405bf9b6febe86f9cc4948d8628402990f 100644 (file)
@@ -295,10 +295,6 @@ const char *lpcfg_get_parametric(struct loadparm_context *lp_ctx,
        if (lp_ctx == NULL)
                return NULL;
 
-       if (lp_ctx->s3_fns) {
-               return lp_ctx->s3_fns->get_parametric(service, type, option, NULL);
-       }
-
        data = get_parametric_helper(service,
                                     type, option, lp_ctx->globals->param_opt);
 
index 3c8c717c4975ab3b3824dd990915a31ffc38ce88..75f9eda9d41516d625dacee17e9079c9bea1e733 100644 (file)
@@ -3,8 +3,6 @@
 
 struct loadparm_s3_helpers
 {
-       const char * (*get_parametric)(struct loadparm_service *, const char *type,
-                                      const char *option, const char *def);
        struct parm_struct * (*get_parm_struct)(const char *param_name);
        void * (*get_parm_ptr)(struct loadparm_service *service, struct parm_struct *parm);
        struct loadparm_service * (*get_service)(const char *service_name);
index 095a25816c5e30a38523901d0327402de9636e84..844cfe903d15de1da9c6ecd181006a4af4ef7899 100644 (file)
@@ -1240,20 +1240,6 @@ const char *lp_parm_const_string(int snum, const char *type, const char *option,
        return data->value;
 }
 
-const char *lp_parm_const_string_service(struct loadparm_service *service,
-                                        const char *type, const char *option,
-                                        const char *def)
-{
-       struct parmlist_entry *data;
-
-       data = get_parametric_helper(service, type, option, Globals.param_opt);
-
-       if (data == NULL||data->value==NULL)
-               return def;
-
-       return data->value;
-}
-
 
 /* Return parametric option from a given service. Type is a part of option before ':' */
 /* Parametric option has following syntax: 'Type: option = value' */
index 0e237e417c70e2b17894aa3d35a288c75886f9f9..32df1836f309df0c2a346eabecc544365c6810ef 100644 (file)
@@ -58,7 +58,6 @@ static bool lp_load_for_s4_ctx(const char *filename)
 
 static struct loadparm_s3_helpers s3_fns =
 {
-       .get_parametric = lp_parm_const_string_service,
        .get_parm_struct = lp_get_parameter,
        .get_parm_ptr = lp_parm_ptr,
        .get_service = lp_service_for_s4_ctx,