r23579: Up to now, the "allparameters" argument to lp_next_parameter was
[ira/wip.git] / source3 / param / loadparm.c
index ed77cfda43505f8da243fa97087077afa821b3c7..a04c0f2fbd9065b06b7d400d9880191193e0e1c3 100644 (file)
@@ -4308,6 +4308,9 @@ struct parm_struct *lp_next_parameter(int snum, int *i, int allparameters)
                            && (parm_table[*i].ptr ==
                                parm_table[(*i) - 1].ptr))
                                continue;
                            && (parm_table[*i].ptr ==
                                parm_table[(*i) - 1].ptr))
                                continue;
+                       
+                       if (is_default(*i) && !allparameters)
+                               continue;
 
                        return &parm_table[(*i)++];
                }
 
                        return &parm_table[(*i)++];
                }