param: Remove unused lp_next_parameter (once used by SWAT)
authorAndrew Bartlett <abartlet@samba.org>
Mon, 27 Jan 2014 01:58:21 +0000 (14:58 +1300)
committerMichael Adam <obnox@samba.org>
Thu, 30 Jan 2014 00:21:26 +0000 (01:21 +0100)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/include/proto.h
source3/param/loadparm.c

index ceaa9024ce7224d260f0f4ea2548b5a6feb10c93..8585e911ff6d1208f3f1c02c95ac3419a89c6353 100644 (file)
@@ -1053,7 +1053,6 @@ bool lp_set_option(const char *option);
 bool lp_is_default(int snum, struct parm_struct *parm);
 bool dump_a_parameter(int snum, char *parm_name, FILE * f, bool isGlobal);
 struct parm_struct *lp_get_parameter(const char *param_name);
-struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters);
 bool lp_snum_ok(int iService);
 void lp_add_one_printer(const char *name, const char *comment,
                        const char *location, void *pdata);
index b90eee50d344d958681cbbddd696005816a0216b..d71a8a0bdede62b634b16cc007fabfd49dfcbd75 100644 (file)
@@ -3673,65 +3673,6 @@ struct parm_struct *lp_get_parameter(const char *param_name)
        return &parm_table[num];
 }
 
-/***************************************************************************
- Return info about the next parameter in a service.
- snum==GLOBAL_SECTION_SNUM gives the globals.
- Return NULL when out of parameters.
-***************************************************************************/
-
-struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters)
-{
-       if (snum < 0) {
-               /* do the globals */
-               for (; parm_table[*i].label; (*i)++) {
-                       if (parm_table[*i].p_class == P_SEPARATOR)
-                               return &parm_table[(*i)++];
-
-                       if ((*parm_table[*i].label == '-'))
-                               continue;
-
-                       if ((*i) > 0
-                           && (parm_table[*i].offset ==
-                               parm_table[(*i) - 1].offset)
-                           && (parm_table[*i].p_class ==
-                               parm_table[(*i) - 1].p_class))
-                               continue;
-
-                       if (is_default(*i) && !allparameters)
-                               continue;
-
-                       return &parm_table[(*i)++];
-               }
-       } else {
-               struct loadparm_service *pService = ServicePtrs[snum];
-
-               for (; parm_table[*i].label; (*i)++) {
-                       if (parm_table[*i].p_class == P_SEPARATOR)
-                               return &parm_table[(*i)++];
-
-                       if (parm_table[*i].p_class == P_LOCAL &&
-                           (*parm_table[*i].label != '-') &&
-                           ((*i) == 0 ||
-                            (parm_table[*i].offset !=
-                             parm_table[(*i) - 1].offset)))
-                       {
-                               if (allparameters ||
-                                   !lpcfg_equal_parameter(parm_table[*i].type,
-                                                          lp_parm_ptr(pService,
-                                                                      &parm_table[*i]),
-                                                          lp_parm_ptr(NULL,
-                                                                      &parm_table[*i])))
-                               {
-                                       return &parm_table[(*i)++];
-                               }
-                       }
-               }
-       }
-
-       return NULL;
-}
-
-
 #if 0
 /***************************************************************************
  Display the contents of a single copy structure.