]> git.sur5r.net Git - openldap/commitdiff
ITS#7098 fix del/add of first schema element
authorHoward Chu <hyc@openldap.org>
Tue, 29 Nov 2011 16:16:34 +0000 (08:16 -0800)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 29 Nov 2011 19:34:35 +0000 (11:34 -0800)
servers/slapd/bconfig.c

index 9ea57df07bf819138158c2101f2ca369a94822f3..3cd551eee686a9410e16221877639901159cbc72 100644 (file)
@@ -1661,7 +1661,7 @@ config_generic(ConfigArgs *c) {
                                /* else prev is NULL, append to end of global list */
                        }
                        if(parse_oc(c, &oc, prev)) return(1);
-                       if (!cfn->c_oc_head) cfn->c_oc_head = oc;
+                       if (!cfn->c_oc_head || !c->valx) cfn->c_oc_head = oc;
                        if (cfn->c_oc_tail == prev) cfn->c_oc_tail = oc;
                        }
                        break;
@@ -1694,7 +1694,7 @@ config_generic(ConfigArgs *c) {
                                /* else prev is NULL, append to end of global list */
                        }
                        if(parse_at(c, &at, prev)) return(1);
-                       if (!cfn->c_at_head) cfn->c_at_head = at;
+                       if (!cfn->c_at_head || !c->valx) cfn->c_at_head = at;
                        if (cfn->c_at_tail == prev) cfn->c_at_tail = at;
                        }
                        break;
@@ -1727,7 +1727,7 @@ config_generic(ConfigArgs *c) {
                                /* else prev is NULL, append to end of global list */
                        }
                        if ( parse_syn( c, &syn, prev ) ) return(1);
-                       if ( !cfn->c_syn_head ) cfn->c_syn_head = syn;
+                       if ( !cfn->c_syn_head || !c->valx ) cfn->c_syn_head = syn;
                        if ( cfn->c_syn_tail == prev ) cfn->c_syn_tail = syn;
                        }
                        break;